@minti Oh, the reason 1 alerts undefined is because variables are predeclared on the global object even before the script executes. The lexer find the "var name" token and creates the variable before running the actual script.