3 ms·
+1 for the named function expression. I really don't like pure function statements because of hoisting. You often end up seeing functions being used before th
by ShellfishMeme 12y ago
+1 for the named function expression.
I really don't like pure function statements because of hoisting. You often end up seeing functions being used before they're defined which can lead to confusing bugs and hurts readability.
I also like that `var Box = function Box (a, b) {}` directly shows people who are new to JS that function declarations are nothing else than just assigning a function to a variable.