-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
39 lines (33 loc) · 905 Bytes
/
script.js
File metadata and controls
39 lines (33 loc) · 905 Bytes
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
function result() {
var students= {
HARDEN :{
english: "97",
science: "78",
maths: "94",
},
LEBRON :{
english: "94",
science: "75",
maths: "84",
},
ANTHONY :{
english: "77",
science: "68",
maths: "91",
},
DURANT :{
english: "57",
science: "89",
maths: "90",
}
}
var studentname=document.getElementById('studentname').value;
var input=studentname.toUpperCase();
var definition=students[input];
var output=document.getElementById("output");
if (definition==undefined) {
output.innerHTML='<hr> There is no information. </hr>' ;
} else {
output.innerHTML='<hr> English score is 97. <hr>Science score is 78. <hr> Maths score is 89 </hr>';
};
};