1.html
</script>
Array
=>Def : Array is a collection of data
1. length
<script>
var cars = ["Saab", "Volvo", "BMW"];
cars.length;
</script>
2.Element
<div id="ele"> </div>
<script>
var bike=["R15","Shine","Honda","Bajaj"];
document.getElementById("ele").innerHTML=bike;
</script>
Method : 1.push()
2.pop()
3.shift()
4.unshift()
5.concat()
3.join()
Properties : 1.length()
2.prototype()
3.constructor()
=> Array in array
<script type="text/javascript"
language="javascript">
var num=3;
switch (num)
{
case 1: alert("One");
break;
case 2: alert("Two");
break;
case 3: alert("Three");
break;
case 4: alert("Four");
break;
case 5: alert("Five");
break;
default: alert("Select 1 to 5 Number");
}
Array
=>Def : Array is a collection of data
1. length
<script>
var cars = ["Saab", "Volvo", "BMW"];
cars.length;
</script>
2.Element
<div id="ele"> </div>
<script>
var bike=["R15","Shine","Honda","Bajaj"];
document.getElementById("ele").innerHTML=bike;
</script>
Method : 1.push()
2.pop()
3.shift()
4.unshift()
5.concat()
3.join()
Properties : 1.length()
2.prototype()
3.constructor()
=> Array in array
<script>
var demo = new array();
demo[0] = new array();
demo[0][0]='A0';
demo[0][1]='B0';
demo[0][2]='C0';
demo[1] = new array();
demo[1][0]='A1';
demo[1][1]='B1';
demo[1][2]='C1';
demo[2] = new array();
demo[2][0]='A2';
demo[2][1]='B2';
demo[2][2]='C2';
document.write("A : "+demo[0][0]+"<br/>");
document.write("B : "+demo[0][1]+"<br/>");
</script>