`level` is a global variable here because you didn't do `var level`.