Thursday, 21 January 2016

JavaScript Arrays

var cars=new Array();
cars[0]="Saab";
cars[1]="Volvo";
cars[2]="BMW
";
or (condensed array):
var cars=new Array("Saab","Volvo","BMW");
or (literal array):

var cars=["Saab","Volvo","BMW"];

0 comments:

Post a Comment