-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday13.html
More file actions
36 lines (36 loc) · 957 Bytes
/
Copy pathday13.html
File metadata and controls
36 lines (36 loc) · 957 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<h1>Welcome All</h1>
<script>
// variable -> data container
//3 different keywords used to create variable:var, let and constant
//string
var name= "Tom"
//integer
var num1 = 12
//float
var num2= 12.345
var sum = num1 + num2
document.write("The sum of two values are",sum)
console.log(num1-num2)
console.log("Hello all")
console.log("happy diwali")
// Function -> a set of instruction will be executed whenever it is called
function abcd(){
console.log("Hello all")
console.log("happy diwali")
}
for(i=1; i<=5;i++){
abcd()
}
//for loop
for(i=1; i<=10;i++){
console.log("hgsbfycgdyg")
}
</script>
</body>
</html>