Working together for standards The Web Standards Project


Quick Explanation of the Object Literal

By Christian Heilmann | February 17th, 2006 | Filed in DOM, DOM Scripting TF

Christian Heilmann explains the object literal JavaScript syntax.

Skip to comment form

Answering some emails, I realised lately that the object literal notation used in modern scripts does confuse JavaScript novices. So if the following is gobbledegook for you:


myStuff={
  myVariable:'value',
  init:function(){
  },
  doStuff:function(){
  }
}

It hopefully will help you to read Show love to the object literal.

Return to top

Post a Reply

Comments are closed.


All of the entries posted in WaSP Buzz express the opinions of their individual authors. They do not necessarily reflect the plans or positions of the Web Standards Project as a group.

This site is valid XHTML 1.0 Strict, CSS | Get Buzz via RSS or Atom | Colophon | Legal