-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmars.js
33 lines (28 loc) · 920 Bytes
/
mars.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
function checkPer(){
var guess = document.getElementById('per').value.trim();
var pers = document.getElementById('pers');
if (guess === "Perseverance"){
pers.textContent = "Correct!";
document.getElementById("pers").style.color = "green";}
else{
pers.textContent = "Not quite, try again!";}
}
function checkCur(){
var guess = document.getElementById('curious').value.trim();
var curi = document.getElementById('curi');
if (guess === "Curiosity"){
curi.textContent = "Correct!";
document.getElementById("curi").style.color = "green";}
else {
curi.textContent = "Not quite, try again!";
}
}
function checkOpp(){
var guess = document.getElementById('opp').value.trim();
var oppo = document.getElementById('oppo');
if (guess === "Opportunity"){
oppo.textContent = "Correct!";
document.getElementById("oppo").style.color = "green";}
else {
oppo.textContent = "Not quite, try again!";}
}