oop - javascript object initializers, usage of -


in javascript documentation reason there paragraph on object literal usage follows:

"if object created object initializer in top-level script, javascript interprets object each time evaluates expression containing object literal. in addition, initializer used in function created each time function called."

i know object literals ie

var myobject = {...} var myarray = [...] 

etc.

i can't envision piece of working code uses above line/notion in mind when coding. examples of code engineered around idea better understanding helpful.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -