Home     |      Learn AJAX     |      Forum     |      Register     |      Submit Resource     |      Submit Article      |      Contact Us

Home Tutorials
 

Show Love to the Object Literal

 
A Javascript tip from Chris Heilmann, who reckons the object literal is "pretty close to sliced bread". Replace: var commonSense=null; var standardsCompliance="50%"; function init(){   // code } function doStuff(){   // code } function doMoreStuff(){   // code }   with the object literal form: awesome={   commonSense:null,   standardsCompliance:"50%",   init:function(){     // code   },   doStuff:function(){     // code   },   doMoreStuff:function(){     // code   } }   He's noticed that newer tutorials [...]

Read More...







 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links