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 |
How do I run javascript on my iphone?
Is javascript pure object oriented?
What do I need to code javascript?
What are the predefined functions in javascript?
How do I open javascript console?
Can you explain how inheritance works in javascript?
What is array constructor in javascript?
How much do javascript programmers make?
Which software is best for javascript?
What is the use of let & const in javascript?
I am working on project in asp.net in which i have opned doc file on client side.plz send me coding on markpatentoffice@yahoo.com.
How to set the focus in an element using javascript?