-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
81 lines (68 loc) · 1.69 KB
/
script.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Q1 For the given JSON iterate over all for loops (for, for in, for of, forEach)
var a=[{"name":"emaya","age":"21"},
{"name":"varman","age":"21"}
]
//using for loop
for(var i=0;i<a.length;i++){
console.log(`Name: ${a[i].name} Age:${a[i].age}`)
}
//using for in
console.log(" using for in");
for(var ans in a){
// console.log(ans);
console.log(`Name: ${a[ans].name} Age:${a[ans].age}`)
}
//using for of
console.log("using for of");
for(var ans of a){
console.log(ans.name)
}
// Q2 create your own resume data in JSON format:
const myResume={
"basics": {
"name": "emayavarman pk",
"email": "emayavarmanpk@gamil.com",
"phone": 9876543210,
"degree": "B.Tech",
"location": {
"address": "1,Welcome city,Tambaram",
"postalCode": 600030,
"city": "Chennai",
"state": "Tamilnadu",
"country": "India"
},
"profiles": [
{
"website": "https://www.linkedin.com/in/emayavarmanpk/",
"github":"https://github.com/Emayavarmanpk"
}
]
},
"education": [
{
"institution": "Bharth university",
"department": "Mechatronics",
"studyType": "fulltime",
"batch start year": 2019,
"batch end year": 2022,
"CGPA": 8.4,
}
],
"skills": [
{
"name": "javascript",
"level": "beginer",
}
],
"languages": [
{
"language": "Tamil,Enlish",
}
],
"interests": [
{
"name": "Playing shuttle,Story reading,",
}
]
}
console.log(myResume);