-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs-lanjutan-26092023.js
79 lines (64 loc) · 1.84 KB
/
js-lanjutan-26092023.js
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
console.log("halo dunia");
// function handleGetFormData() {}
// // DOM
const inputName = document.getElementById("name").value;
const inputEmail = document.getElementById("email");
const inputCity = document.getElementById("city");
const inputZipCode = document.getElementById("zipcode");
const inputCheckbox = document.getElementById("checkbox").checked;
// // -> getId "button"
// // -> getId "title"
// // -> display text dari id "title"
// // const button
// console.log(inputName);
// const inputButton = document.getElementById("button");
// const inputTitle = document.getElementById("title");
// // addEventListener
// // function
// function showAlert() {
// alert(inputTitle.innerText);
// }
// // inputTitle.value
// // alert(inputTitle.value)
// // const inputUser = prompt("Warna bg : ");
// // document.getElementsByTagName("body")[0].style.background = inputUser;
// inputName.style.background = "red";
// document.body.innerHTML += `<button onclick="showAlert()">Kirim juga</button>`;
// // const nama = "Tio";
// // const umur = 20;
// // const listSepuh = [
// // "arya",
// // "tio",
// // "farid",
// // [
// // {
// // name: "arya",
// // umur: 30,
// // favFood: ["fried rice", "etc"],
// // },
// // {
// // name: "tio",
// // umur: 30,
// // favFood: ["fried rice", "etc"],
// // },
// // {
// // name: "farid",
// // umur: 30,
// // favFood: ["fried rice", "etc"],
// // },
// // ],
// // [
// // [20, 30],
// // [40, 70],
// // ],
// // ];
// // // console.log(listSepuh[2]);
// // // console.log(listSepuh[3][0].umur);
// // console.log(listSepuh[4][0][1]);
// // const sepuhFarid = {
// // name: "farid",
// // umur: 20,
// // favFood: ["fried rice", "etc"],
// // };
// // console.log(listSepuh[3]);
// // console.log(sepuhFarid.umur);