Array in javascript
Array can store more than one values but same data type. push method is used to insert the values into array, when you want to store the values into array you can use this push method.
Example Program:- (Editor)

Editor is Loading...
Advertisement
syntax
array_var.push(value);
Example
--------
--------
var arr=[];
for(i=0;i<5;i++)
{
arr.push(i);
}
--------
--------
Example Program:- (Editor)
Editor is Loading...
Advertisement
Post a Comment for "Array in javascript"