How do you create array in javascript?

 Posted by Rajni.Shekhar on 4/12/2012 | Category: JavaScript Interview questions | Views: 1653 | Points: 40
Answer:

Using following code.

var arr=new Array();

arr[0]="dot";
arr[1]="net";
arr[2]="funda";

document.write(arr[0] + " " + arr[1] + " " + arr[2]);


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response