Multiple tier / dimension array in javascript

It is possible to define a multiple tier javascript array  that each “member”can contain more primitive data types or array object,  below example shows 3 tier array.

  • Top tier holds array object, eg:  new Array(“002”,new Array(“BB1”,“BB2”))
  •  Second tier array holds two dimension data: a string type “002”, and another array object new Array(“BB1″,”BB2”)
  • Third tier holds multiple dimension data: “BB1″,”BB2”


var array_demo = new Array( new Array(“001”,new Array(“AA1”))  ,   new Array(“002”,new Array(“BB1”,“BB2”))   ,   new Array(“003”,new Array(“CC1”,“CC2”,“CC3”))    );


  1. Leave a comment

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: