Obviously, I found out my own solution to level 2 and even finished the whole game. What is constantly puzzling me, is the hint from the level description:
Well, it looks like they're on to us. The path isn't as
clear as I thought it'd be. But no matter - four clever
characters should be enough to erase all their tricks.
The hint specifically mentions four characters
Did someone solve it by using only 4 characters? because my solution looks like this:
var player = map.getPlayer();
map.placeObject(player.getX()+2, player.getY(), 'exit');