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 |
Is client side front end?
Is Javascript a Functional Programming Language?
why can't we call a static method from a non-static method
Define closure.
How much does a javascript developer make?
If 2 methods have same name and same number of parameters, which one will be executed first?
1) How can we use java script in testing the application? 2) What all the things(Software application - like browser, notepad) we need to learn Jscript?
How can javascript be used to personalize or tailor a web site to fit individual users?
How to capture the Image width and height using QTP script ? Kindly answer plz.... Thanx in adavance...
Can you use javascript to hack?
What is Number object in JavaScript?
Which is faster jquery or javascript?