Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
//Ask the user for grades.
var gradeFirst = prompt("Enter your first nine weeks grade.")
var gradeSecond = prompt("Enter your second nine weeks grade.")
//Converts users input from a string to a number
var num1 = parseInt(gradeFirst)
var num2 = parseInt(gradeSecond)
//Adds the two values together
var total = num1 + num2;
//Tests whether or not the number is greater than 134
if(total >= 134){
  console.log("You will pass!")
}
else{
  var need = 134 - (num1 + num2)
  console.log("You will need " + need + " of points to pass.")
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers