Re:“var functionName” vs “function functionName”
by reconor on Wednesday April 30, 2014 @01:09PM
(#7674660)
Using var to declare a variable later assigned to an anonymous function can help with managing larger JavaScript projects where scoping and data member access is important. Here is a pattern I tend to apply rather frequently, included is an example for a custom instance object, which would be created with 'new', and a Namespace object:
[ Parent
| on HN ]
There are no comments on this comment yet.