-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDSA.html
77 lines (68 loc) · 1.65 KB
/
DSA.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
// let bankBalances = [30000, 10000, 50000, 20000, 40000]
// let newBalance = bankBalances.forEach(function(element){
// firstDigit=element;
// while(firstDigit>=10){
// firstDigit= (firstDigit/10);
// }
// if(firstDigit%2==0){
// console.log(element+= (20/100)*element);
// }
// else{
// console.log(element+= (35/100)*element);
// }
// })
let students = [
{
name: 'John',
batch: 'Batch 11',
marks: {
english: '38',
maths: '72',
science: '82',
hindi: '21',
social:'48',
}
},
{
name: 'Sita',
batch: 'Batch 12',
marks: {
english: '74',
maths: '82',
science: '32',
hindi: '42',
social: '28',
}
},
{
name: 'Shyam',
batch: 'Batch 13',
marks: {
english: '28',
maths: '92',
science: '63',
hindi: '81',
social: '61',
}
}
]
var num=0;
john = +
var riya =students[0].marks.english + students[0].marks.maths + students[0].marks.science+ students[0].marks.hindi + students[0].marks.social
console.log(riya)
// for(x of students[0].marks){
// console.log(x)
// }
</script>
</head>
<body>
</body>
</html>