Re:Black Box Driven Development in JavaScript
by ShellfishMeme on Wednesday August 27, 2014 @03:27PM
(#8234222)
+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.
[ Parent
| on HN ]
There are no comments on this comment yet.