-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.js
More file actions
39 lines (33 loc) · 643 Bytes
/
Copy pathloop.js
File metadata and controls
39 lines (33 loc) · 643 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
37
38
39
//LOOPS
/* 1.for loop
2.while loop
3.do while loop
4.for each loop
5.for in loop
6.for of loop */
//for(let i=0;i<=1;i++){}
//console.log("ca");}
//while loop
//let i=0;
//while(i<3);{
//console.log("math");
//i++;}
//do while loop
/* let i=0;
do{
console.log("abc");
i++;
} while (i<3);*/
//for each
/* cities=["ktm","btw"]
cities.forEach(function(value,i){
console.log(value);
});*/
// for of
// const studentlist=["ram","shaym"];
// for(let student of studentlist){
// console.log(student);}
// For in
// const studentlist=["ram","shaym"];
// for (let std in studentlist){
// console.log(studentlist[std]);}