-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArray.html
More file actions
39 lines (29 loc) · 872 Bytes
/
Copy pathArray.html
File metadata and controls
39 lines (29 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<html>
<head>
<title>Arrays</title>
<h1>ARRAYS</h1>
</head>
<body>
<script type="text/javascript" >
var a=[1,2,3,4,5,5]
//array acces from the legth method
for(var x =0;x<a.length;x++)
{
document.write("numbers in the array :",a[x]);
}
var b = [28,4,98,"java","python","c"]
//array can have different data tpyes
for(var x =0;x<b.length;x++)
{
document.write("elements in the array :",b[x])
}
var c = [83,89,'r',23]
// we can add data to the array while executing
c.push("javascript")
for(var i =0;i<c.length;i++)
{
document.write("this is a multiple data type array :",c[i])
}
</script>
</body>
</html>