> (function (a, b, c) {
>
> }(2))
The main disadvantage of that style over the one I'm advocating for is that it
visually separates the variable declaration (`a`) from its value initialization
(`2`). If there's 5, 10, or more lines of code in between them, it makes it
much harder to figure out the initial state of variables as they enter a
"block".
Also, obviously, a function call is more heavy weight (performance wise) than a
block with scoped declarations.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss