Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Overview of JavaScript ES6 features. Parent comment
Not quite. var's are hoisted to the top of their most local function.
(function(){ (function(){ var x = 123; })(); { var y = 123; } // Here, x is not defined, but y is })(); // Here, neither x nor y are defined
(function(){ var y; (function(){ var x; x = 123; })(); { y = 123; } // Here, x is not defined, but y is })(); // Here, neither x nor y are defined
There are no comments on this comment yet.
Not quite. var's are hoisted to the top of their most local function.
The above code essentially gets translated to the following: