Conversation

Notices

  1. !coderpony So I found this: http://dmitry.baranovskiy.com/post/so-you-think-you-know-javascript I'm actually quite surprised to say I could only guess 2/5 correctly. 4 and 5. 1 makes no sense from a code point of view, 2 WTH IS GOING ON HERE and 3 I forgot about how static function declarations are special lmao.

    Sunday, 16-Jun-13 15:59:02 UTC from web
    1. @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.

      Sunday, 16-Jun-13 16:08:14 UTC from web