Created
December 5, 2017 00:19
-
-
Save bnates/bd3bfdc716fe0bc79a2ffe138fd2a9f6 to your computer and use it in GitHub Desktop.
guessing.html
This file contains 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> | |
<title>Welcome to 101</title> | |
</head> | |
<body> | |
<h1>Guessing Game!</h1> | |
<script> | |
var user = prompt('what is your name?'); | |
console.log(user); | |
alert('Hi there ' + user + ', I\'m going to ask you a question.'); | |
var answer = prompt(user + ', this is a yes/no question. Please answer with Y or N. Do you love coding?'); | |
console.log('my users answer:', answer); | |
if (answer === 'Y') { | |
alert('yay! i love coding too!'); | |
} else { | |
alert('well, you prolly should not be in 201'); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment