Skip to content

Instantly share code, notes, and snippets.

@terrancebryant
Created October 16, 2013 21:15
Show Gist options
  • Save terrancebryant/7015010 to your computer and use it in GitHub Desktop.
Save terrancebryant/7015010 to your computer and use it in GitHub Desktop.
<!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>
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