News for hackers. Stuff that matters.
Re:Fat arrow functions in Javascript by robcee on Friday September 20, 2013 @07:08PM (#6421085)
I usually think of "hoisting" as promoting a var outside of its containing scope to within the next block.

e.g.,

function() { var a = 2; // b is visible here if (a == 2) { var b = 3; } }

Re:Fat arrow functions in Javascript by iMark on Saturday September 21, 2013 @05:33AM (#6422470)
Hoisting still occurs within a scope such that, for example, a function defined at the end of a block can be called at the top.
Re:Fat arrow functions in Javascript by robcee on Saturday September 21, 2013 @10:48AM (#6423090)
right. The point I was trying to illustrate was that the inner variable declared with a "var" keyword was visible outside its containing block. If I'd used "let" there, it would not be.