-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforloop.js
More file actions
68 lines (64 loc) · 1.09 KB
/
Copy pathforloop.js
File metadata and controls
68 lines (64 loc) · 1.09 KB
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
// for (let i=10; i>=0;i--){
// console.log(i)
// }
// let arr =["superman","batman","wonderwomen","flash","greenlanton"]
// for(let i=arr.length-1; i>=0;i--){
// console.log(arr[i])
// }
// const letslearnUsersArray=[{
// name:"saugat Bagale",
// age:23,
// isLogin:true
// },{
// name:"Nishant",
// age:24,
// isLogin:false
// },
// {
// name:"Aakriti",
// age:22,
// isLogin:true
// },
// {
// name:"subin",
// age:19,
// isLogin:false
// }
// ]
// for(let i=0; i<letslearnUsersArray.length;i++){
// console.log(letslearnUsersArray[i].name)
// }
const letslearnUsersArray=[{
name:"saugat Bagale",
age:23,
isLogin:true
},{
name:"Nishant",
age:24,
isLogin:false
},
{
name:"Aakriti",
age:22,
isLogin:true
},
{
name:"subin",
age:19,
isLogin:false
},
{
name:"kamala",
age:19,
isLogin:true
},
{
name:"suman",
age:19,
isLogin:false
}]
for(let i=0; i<letslearnUsersArray.length;i++){
if(letslearnUsersArray[i].isLogin === true){
console.log(letslearnUsersArray[i].name)
}
}