Javascript Namespace Pattern
I came across this JavaScript intricacy and was struggling to find the difference. Its about JavaScript namespaces. My question is simple, one form of namespace definition looks li
Solution 1:
They both accomplish the exact same thing, but Crockford recommends the second one.
I'm not sure what you mean by "namespace" though. They both create a new closure, which you can use for local variables, so I guess it's kind of like a namespace.
Post a Comment for "Javascript Namespace Pattern"