Created
October 16, 2013 21:15
-
-
Save terrancebryant/7015010 to your computer and use it in GitHub Desktop.
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> | |
<meta name="description" content="Built-In's Bluff" /> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<button class="clickster">Click Me</button> | |
</body> | |
</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
var gotName = false; | |
var parkIsOpen = false; | |
/* while(gotName === false){ | |
var userName = prompt("Yo passenger! Whats your name?"); | |
if( confirm("Are you sure your name is" + userName + "?") ){ | |
alert("Sup " + userName + "?"); | |
gotName = true; | |
} | |
} */ | |
if(parkIsOpen) { | |
alert("Welcome to the Badlands National Park! Try to enjoy your stay."); | |
} else { | |
alert("Sorry, the Badlands are particularly bad today. We're closed!"); | |
} | |
var userAge = prompt("What's your age user?"); | |
var ageIsCorrect = false; | |
while(!ageIsCorrect){ | |
if( confirm("You entered " + userAge + ". Is this correct?") ) { | |
ageIsCorrect = true; | |
} else { | |
userAge = prompt("What's your age, user?"); | |
} | |
} | |
alert("Great! Your age is logged as " + userAge + "."); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment