Ramblings of a Javascript Kid
Wednesday, December 29, 2010
Immediate Object Initialization
Just like Immediate functions we can declare immediate object initializations as well.
Example:
({
init:
function
(){
console.log(
'immediate initialization'
)
}
}).init()
Only problem with this is, most of the minification tools fail to minify such object declarations.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment