-
Notifications
You must be signed in to change notification settings - Fork 0
/
json.js
57 lines (39 loc) · 907 Bytes
/
json.js
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
const studentsmarks={
"Akanksha": '90%',
"Priya" : '80%',
"Sakshi" : '70%',
"Neha" : '92%',
"pihu" : '88%'
}
console.log(studentsmarks)
console.log(studentsmarks["Neha"])
const data=[ {
name : "Arnav",
Age : '20',
Rollno :'54'
},
{
name : "Pratik",
Age : '18',
Rollno :'29'
},
{
name : "Yash",
Age : '20',
Rollno :'30'
},
{
name : "Viraj",
Age : '17',
Rollno :'55'
}]
console.log(data[1])
console.log(data[0]["name"])
data.map((Data)=>{
if(Data['Rollno']%2==0){
console.log("RollNo" + ` ${Data['Rollno']} is passed `);
}
else{
console.log("RollNo" + ` ${Data['Rollno']} is failed`);
}
})