-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtut_55.html
55 lines (49 loc) · 1.45 KB
/
tut_55.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loops</title>
</head>
<body>
<div class="container">
This page is about loops
</div>
<script>
console.log("this is tut_55");
// let i=0;
// for (i=0; i<3;i++){
// console.log(i);
// }
let friends =["saksham","aviroop","avinash","tilak"];
// for (let index = 0; index < friends.length; index++) {
// console.log("hello bhai logo," + friends[index]);
// }
// friends.forEach(function f(element){
// console.log("hello friend," + element +" to modern javascript");
// });
// for (element of friends)
// {console.log("hello friend," + element +" to modern javascript again");
// }
let employee={
name:"Harry",
salary:20000000,
channel:"creator Hub"
}
for (key in employee){
console.log(`the ${key} of employee is ${employee[key]}`);
}
let i=0;
while(i<4){
console.log(`${i} is less then 4`);
i++;
}
let j=44;
do{
console.log(`${j} is less then 4`);
j++;}
while(j<4);
</script>
</body>
</html>