-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunction.js
110 lines (64 loc) · 1.88 KB
/
function.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* - Total Admnission fees
*/
console.log(`
<==========-Total Admnission fees-======>
`);
let total_admition_fees = 0;
for ( data of studentBaioData ) {
console.log(`Name ${data.name} fees ${data.fees} `);
total_admition_fees += data.fees
}
-
console.log(`
=---------------------------------------------------------------->>
total_admition_fees : ${total_admition_fees}`);
/**
* - Find All Female Students
*/
console.log(`
<==========- Find All Female Students======>
`);
let total_female_student = 0;
for ( data of totalFemaleStudents ) {
if (data.gender == "Female") {
console.log(`Name : ${data.name}, This student is ${data.gender} `);
total_female_student += data.gender
}
}
/**
* - Find class wise student result
*/
console.log(` <==========-Find class wise student result-======>
`);
let total_student_class = 0;
for ( data of totalFemaleStudents ) {
if (data.department == "Five") {
console.log(`Name : ${data.name}, This student is Class ${data.department} `);
total_student_class += data
}
}
/**
* - Location wise student result
*/
console.log(` <==========-location_wise_student-======>
`);
let location_wise_student = 0;
for ( data of LocationWiseStudentResult ) {
if (data.location == "koyra") {
console.log(`Name : ${data.name}, This student is location ${data.location} `);
location_wise_student += data
}
}
/**
* - find student between 10 - 25 age
*/
console.log(` <==========-find student between 10 - 25 age-======>
`);
let find_student_between = 0;
for ( data of findStudentBetween10_25age ) {
if (data.age >= 10 && data.age <= 25 ) {
console.log(`Name : ${data.name}, This student is age ${data.age} years old. `);
find_student_between += data.age
}
}