forked from panache-chinmay/javascriptDeccan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript7.js
More file actions
100 lines (74 loc) · 1.58 KB
/
Copy pathscript7.js
File metadata and controls
100 lines (74 loc) · 1.58 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Build a challenge using loops arrays and objects
// Create a data struture to hold the information about the students
// Lets break down the code into two steps
/*
var students = [
]
var students = {
{},
{},
{},
{},
}
Each object should contain the following information about the properties .
// Name
// Tracks (e.g ios , Web Design , Front End Development)
// Acheivements (should hold a number value)
// Points (holds the number of points a student has earned)
*/
// Create atleast five new objects
/*
All the students must have same type of property
tracks , Acheivements and points
*/
var students = [
{
name: "chinmay",
track: "Andriod",
acheivements:345,
points:67
},
{
name: "poorva",
track: "Angular 2",
acheivements:7,
points:78
},
{
name: "sandeep",
track: "IOS",
acheivements:390,
points:61
},
{
name: "rajesh",
track: ".Net",
acheivements:556,
points:89
},
{
name: "mayuri",
track: "Java",
acheivements:388,
points:99
},
{
name: "poorva",
track: "Angular Js",
acheivements:345,
points:67
}
,
{
name: "poorva",
track: "IOS",
acheivements:905,
points:6900
}
];
/* Loop through every element of array which is basically object of type student
1) To loop through this , we should use bracket notation to loop through array.
2) use bracket notation to loop over array and then use . notation to get properties of
every arrays.
3) Add the javascript code to another js file , to keep data and functionality separately.
*/