JS functions not loading from different files

Problem description:
I’m using functions from different .js files. They are loaded using tags at the end of the HTML body, in a logical order based on which functions depend on others being loaded first. This has been working for several weeks, but suddenly tonight they are acting as though functions in 1 file are not recognized by another. I don’t see anything in the HTML or JS files that would have changed this behavior.

Expected behavior:
JS functions already loaded into memory should be able to be called from a different JS file.

Actual behavior:
Functions are not recognized by a different JS file.

Steps to reproduce:
Run project at link below. “score” has always been defined when the CurrentWord.js object is created.

Bug appears at this link:

Mac OS 12.5 on M1 chip, Firefox 109.0.1 64-bit

user has no repls :confused: send an updated link


If your repl is private please send a minimal, reproducible example, or a non-revealing screenshot.


I commented out enough code that I discovered a missing ) about 100 lines down in the first JS file was causing the problem. Not sure why the only error message referred to a variable out of scope (because a different JS file wasn’t loading).

Thank you both for the attention, sorry I forgot to mark the repl as public.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.