We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d9c73b commit 7476340Copy full SHA for 7476340
Example/Lectures/01 Lecture_Example/Basic/Array.html
@@ -0,0 +1,44 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Document</title>
7
+
8
+ <script>
9
10
11
+ const fruits = ["cherry", "banana", "apple"];
12
13
+ //for(i = 0 ; i <3 ; i++){
14
+ // document.write("<li>",fruits[i],"</li>")
15
+ //}
16
17
+ for(i in fruits){
18
+ console.log(fruits[i])
19
+ }
20
21
+ for(i of fruits){
22
+ console.log(i)
23
24
25
26
+ const person = {
27
+ firstName: "John",
28
+ lastName: "Doe",
29
+ age: 30
30
+ };
31
32
+ for (let key in person) {
33
+ console.log(key + ": " + person[key]);
34
35
36
37
38
+ </script>
39
40
+</head>
41
+<body>
42
43
+</body>
44
+</html>
0 commit comments