That may happen sometimes on every editor because:
A bug in the editor
A bug in your code (i.e., an error in your code, like a missing ; or other punctuation)
A bug on online editors may occur if, for instance, one of the required libraries (JavaScript files) fails to be loaded. Other times it may be a bug on one of the libraries, for which you can’t fix.
Make sure there are no syntax errors, as sometimes JavaScript may not fail and you may think it’s working correctly.
You can search online for a syntax error checker for JavaScript to be sure (or use one on your computer and/or setting up a linter).