Forum
>
Use short hand notation for declaring arrays and ...
Welcome, Guest

Use short hand notation for declaring arrays and objects
Topic Normal Use short hand notation for declaring arrays and objects
by Subhash on 09/17/2009 19:08

Arrays and objects are declared as following:

 var someArray = new Array();

var someObject = new Object();

 

There is a shorthand notation for declaring these which is much more easier to use. It can be used like this:

 var someArray = [];

var someObject = {};