-
-
Save Bijesse/a5dcb5d39c06c85a648b to your computer and use it in GitHub Desktop.
Grading App 1.0 // source http://jsbin.com/vucobo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Grading App 1.0</title> | |
</head> | |
<body> | |
<input id="grade" placeholder="Enter Grade" /> | |
<button id="btnSubmit">Submit</button> | |
<script id="jsbin-javascript"> | |
// Grading App v1.0 | |
btnSubmit.addEventListener("click", function(){ | |
var grade = document.getElementById("grade").value; | |
//Input your code below: | |
if (grade >= 90) { | |
alert("You got a " + grade + "! Therefore you got an A"); | |
} else if (grade >= 80) { | |
alert("You got a " + grade + "! Therefore you got a B"); | |
} else if (grade >= 65) { | |
alert("You got a " + grade + "! Therefore you got a C"); | |
} else { | |
alert("You got a " + grade + "! Therefore you failed"); | |
} | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">// Grading App v1.0 | |
btnSubmit.addEventListener("click", function(){ | |
var grade = document.getElementById("grade").value; | |
//Input your code below: | |
if (grade >= 90) { | |
alert("You got a " + grade + "! Therefore you got an A"); | |
} else if (grade >= 80) { | |
alert("You got a " + grade + "! Therefore you got a B"); | |
} else if (grade >= 65) { | |
alert("You got a " + grade + "! Therefore you got a C"); | |
} else { | |
alert("You got a " + grade + "! Therefore you failed"); | |
} | |
}); </script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Grading App v1.0 | |
btnSubmit.addEventListener("click", function(){ | |
var grade = document.getElementById("grade").value; | |
//Input your code below: | |
if (grade >= 90) { | |
alert("You got a " + grade + "! Therefore you got an A"); | |
} else if (grade >= 80) { | |
alert("You got a " + grade + "! Therefore you got a B"); | |
} else if (grade >= 65) { | |
alert("You got a " + grade + "! Therefore you got a C"); | |
} else { | |
alert("You got a " + grade + "! Therefore you failed"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment