How can I define an array in JavaScript?
Answers were Sorted based on User's Feedback
Answer / madhav arora
Arrays can be defined in following three ways :
1. regular method:
ex: var arrayname=new Array();
arrayname[0]="abc";
arrayname[1]="pqr";
arrayname[2]="xyz";
2.condensed method:
ex: var arrayname=new Array("abc","pqr","xyz");
3.literal method:
ex:var arrayname=["abc","pqr","xyz"];
Is This Answer Correct ? | 16 Yes | 4 No |
Answer / hiren b garasia
4.dense method:
ex: var days=new
Array('Mon','Tue','Wed','Thus','Fri','Sat','Sun');
Is This Answer Correct ? | 5 Yes | 4 No |
What is the difference between a web-garden and a web-farm?
What is the importance of javascript?
What are the different actions that are performed using javascript?
Name some of the built-in methods and the values returned by them.
Describe what u had done today?
Hi Friends, I am new to java, please provide some use full docs, and where can i get basic Java script docs... thanx in advance
What is javascript hoisting?
How to toggle display an html element?
What is the difference between window and document in Javascript?
What are the variable naming conventions in javascript?
How do you change the style/class on any element using javascript?
what is lazy fetching in hibernate