-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
54 lines (49 loc) · 1.43 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
// Task_1
// Create a resume in JSON fromat
const resume = {
"name": "Durai Prabhakar M",
"age": 22,
"email": "duraiprabhakar007@gmail.com",
"phoneNumber": "+91-1234567890",
"address": "Apartment 20 ,90 Bedford Street, Greenwich Village, NYC",
"education": [
{
"class": "Tenth",
"board": "SSLC",
"school": "Geetha Matric Hr Sec School",
"year": 2017
},
{
"class": "Twelvth",
"board": "SSLC",
"school": "Geetha Matric Hr Sec School",
"year": 2019
},
{
"degree": "Bachelors in Engineering",
"course": "Computer Science",
"college": "Holycross Engineering College",
"year": 2019
}
],
"qualities": ["Team Worker", "Problem Solver", "Good Communicator","Enthusiastic"],
"skills": ["HTML/CSS", "JavaScript", "Python", "NodeJS","Angular"],
"projects": ["Online Library Management System", "Online Money Lender Application", "Online Voting System with FRS"]
};
const data = Object.entries(resume);
// Task_2
// Using various tpyes of for loop
//(a) for loop
for (let i = 0; i < data.length; i++) {
console.log(data[i]);
}
//(b) for...in loop
for (let key in data) {
console.log(data[key]);
}
//(c) for...of loop
for (let [key, value] of data) {
console.log(value);
}
//(d) forEach
data.forEach(item => console.log(item));