re: Vanilla JS, back to basics (Part 2: Hoisting) VIEW POST


There is a fine difference between

function a() { ... }


var a = function() { ... }

in that one is a named function and another is a variable that has an anonymous function as its value. I saw this making a pretty big difference in code editors.

We should always use let in our javascript projects. Hoisting is one reason you've underlines pretty well in this thread. We actually made a video that includes this and 2 more reasons to stop using var in js:

Code of Conduct Report abuse