Programming is my life~!
Sunday, February 17, 2013
Singleton_1
/* Singleton as an Object Literal. */
MyNamespace.Singleton = {};
You will now use a function, executed immediately, to provide the same thing:
/* Singleton with Private Members, step 1. */
MyNamespace.Singleton = function() {
return {};
}();
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment