How would I solve Level 21 (endOfTheLine.js)?

This one took me a bit of thinking.

Think hard about why you can't exit the level. There's nothing in the level code that stops you, so it must be coming from somewhere else.

Slightly further hint:

There's also a scripts/ folder in the menu.

Even further hint:

You can edit the black sections of the scripts, same as you can for a level. Make sure you 'Execute' while in the script you've edited, not the level code. The script seems to revert if you change files.