JavaScript Object Literal (via saurabhgoel)

It is a means of containing a lot of data in one tidy package. It is a comma separated list of name value pairs wrapped in curly braces. In JavaScript an object literal is declared or defined as follows: var myObject = {} An object literal with a few properties, from a Rotating Images example: var myRotator = { path: 'images/', speed: 4500, images: ["smile.gif", "grim.gif", "frown.gif", "bomb.gif"] } Object literals are used as a means of encapsu … Read More

via saurabhgoel

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s