Allow multiple JS files to read each other

#1

I’m working on a project where my JavaScript file is nearly 2000 lines long. I have it sorted into sections, but it’s frustrating to have to scroll up and down through lots of code.

It would be great if I could separate my JS file into multiple files that can read global variables and call functions from each other. This technically works at the moment, but glitch flags the errors when the function I’m calling isn’t defined in that file.

If there was an option to have tabs on a single JS file, or tell glitch to treat two JS files as one, that would help me organise my code.

0 Likes