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 |
To set all checkboxes to true using javascript?
How to test for bad numbers using javascript?
Can webassembly replace javascript?
What does triple dot mean?
How to remove the event listener?
Hello , I am using following java script to open new window in I.E,but i am facing an issue the new window hangs often while opening,when you move mouse it opens normally.Can any body help me why this is happening as i am unable to understand this issue?please please if any one know so kindly help me I am in real difficulty through this issue.Thanks 'if(window.clipboardData){clipboardData.setData("Text","' + a.PatID + '");}' + 'ordwindow= window.open ("' + @OrderDetailURL + '", "RXOrderDetail", "location=0,status=0,menubar=0,toolba r=0,scrollbars=1,resizable=1"); ordwindow.moveTo(parent.screenLeft,0);var x; x=new ActiveXObject("WScript.Shell");x.SendKeys("% "); x.SendKeys ("x"); //fcttest((sp_RX_ChangeOrderStatus ' + '''' + a.DocID + '''' + ', 1, ' + convert(varchar,@SessionID) + '));' As [W],
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?
What is difference between array.splice() and array.slice() method in javascript?
How to define a anonymous function?
What are exports and imports?
Name the different types of pop up boxes in Javascript?
What does break and continue statements do in javascript?