re: Vanilla JS, back to basics - Part. 2: hoisting VIEW POST

FULL DISCUSSION
 

There is a fine difference between

function a() { ... }

and

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