Undefined error of global variables

When i do like
global.test = 0; test
it shows “test” is undefined… but the code still work

Hi @Miky88 – this sounds like an issue with the linter used in the editor. The linter that Glitch uses is called CodeMirror and unfortunately it does not seem to be customizable (as in, it would be tricky even for Glitch to customize which linter rules are turned off or on inside of it.) I believe that there are issues opened #feature-ideas petitioning to change the linter if you want to vote for one!

I think this user had the same experience: Javascript - Global variables issue