Blogroll

Powered by Blogger.

Thursday, 12 June 2014

How To Declare an Empty Multi - dimensional JavaScript Array ?

by realfinetime  |  in JavaScript 2D Array at  06:37

JavaScript arrays is an interesting topic. Arrays can be declared in different ways. If we don't know the number of elements that will be entered to the array, then the size of the array cannot be declared during the declaration of the array. In such situations, array can be declared as given below.

var empty_multi_dim_array = [[]];

In such declaration, size of the array will not be declared initially. Instead an empty square bracket inside another square bracket will be declared as shown above. 

CLICK HERE TO SEE JAVASCRIPT 2D ARRAY OPERATION

0 comments:

IMPORTANT NOTICE

All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips

Proudly Powered by Blogger.