-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path14.tipe-data-array.html
More file actions
47 lines (33 loc) · 817 Bytes
/
14.tipe-data-array.html
File metadata and controls
47 lines (33 loc) · 817 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
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tipe Data Array</title>
</head>
<body>
<script>
let arrayKosong = [];
let arrayNama = ["Eko", "Kurniawan", "Khannedy"];
const names = [];
names.push("Eko");
names.push("Kurniawan", "Khannedy");
names.push("Budi", "Joko", "Rudi");
console.table(names);
console.info(names[0]);
console.info(names[1]);
console.info(names[2]);
names[0] = "Programmer";
names[1] = "Zaman";
names[2] = "Now";
console.table(names);
delete names[3];
console.table(names);
names.push("Eko Lagi");
console.table(names);
names[3] = "Diubah Lagi";
names.push(1,2,3,4,5);
names.push(["Eko", "Kurniawna", "Khannedy"]);
console.table(names);
</script>
</body>
</html>