-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lesson 13.html
122 lines (96 loc) · 2.73 KB
/
Lesson 13.html
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<title>JavaScript</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Billy Dhen Clir Busilan">
</head>
<body>
<script>
/*document.write("Hello, World!");
var myvariable1;
myvariable = 5
var myvariable = 5;
var myvariable = true;
var myvariable = false;
var myvariable = "fish"
var words = "This is";
var morewords = "a sentence";
var sentence = words + morewords;
document.write(sentence);
var num1 = 5;
var num2 = 3;
var total1 = num1++;
document.write(total1)
var num1 = 5;
var num2 = 3;
var total1 = num--;
document.write(total1)
var aplha = "ABCDEFG"
var length = aplha.length
document.write(length);
var aplha = "ABCDEFG"
var result = aplha.substring(0,5);
document.write(result);
var a = new Array(7);
a[0]= "cat"
a[1]= "dog"
a[2]= 95;
a[6]= true;
document.write(a[6]);
var a = new Array ("cat", "dog", 53, true);
document.write(a[1]);
var a = ["dog", "cat", 3, 5, false]
document.write(a[3]);
function sayHello(who) {
document.write("Hello," + who)
}
sayHello("Bob");
document.write("<br>");
sayHello("Mary");
var a = 7;
if (a >10){
//alert(a)
}
var a = 12;
if (a >10){
//alert(a)
}
var a = 7;
if (a <10){
//alert(a)
}
var a = 7;
if (a >=10){
alert(a)
}
var a = 7;
if (a <=10){
alert(a)
}
var a = 7;
if (a !=10){
alert(a)
}
var a = 7;
if (a ==10){
alert(a)
}
var a ="Jake";
if (a == "Jake"){
alert(a);
}
var a ="Jake";
if (a != "Jake"){
alert(a);
} else{
alert("The condition is false");
}*/
for(i=0;i<5;i++) {
document.write ("This is iteration "+ i + " <br>");
}
</script>
</body>
</html>