Skip to content

Instantly share code, notes, and snippets.

Created January 14, 2016 05:34
Show Gist options
  • Save anonymous/472cdbaf1052f31e68d2 to your computer and use it in GitHub Desktop.
Save anonymous/472cdbaf1052f31e68d2 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/vumile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
// Check if the user is ready to play!
confirm("Are you ready to play!");
var age= prompt("What is your age?");
if (age< 13)
{
//do this code//
alert("ask your parent if you can play.");
}
else
//"otherwise"//
{
//do this code//
alert("Let's have some fun!");
}
alert("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
alert("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer= prompt("Do you want to race Bieber on stage?");
userAnswer= "yes";
if (userAnswer=== ("yes"))
{alert("You and Bieber start racing. It's neck and neck! You win by a shoelace!");}
else {alert("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");}
var feedback= prompt("Please rate my game out of 10");
var feedback= 8;
if (feedback > 8)
{alert ("Thank You! We should race at the next concert!");}
else {alert ("I'll keep practicing coding and racing.");}
</script>
<script id="jsbin-source-javascript" type="text/javascript">// Check if the user is ready to play!
confirm("Are you ready to play!");
var age= prompt("What is your age?");
if (age< 13)
{
//do this code//
alert("ask your parent if you can play.");
}
else
//"otherwise"//
{
//do this code//
alert("Let's have some fun!");
}
alert("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
alert("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer= prompt("Do you want to race Bieber on stage?");
userAnswer= "yes";
if (userAnswer=== ("yes"))
{alert("You and Bieber start racing. It's neck and neck! You win by a shoelace!");}
else {alert("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");}
var feedback= prompt("Please rate my game out of 10");
var feedback= 8;
if (feedback > 8)
{alert ("Thank You! We should race at the next concert!");}
else {alert ("I'll keep practicing coding and racing.");}</script></body>
</html>
// Check if the user is ready to play!
confirm("Are you ready to play!");
var age= prompt("What is your age?");
if (age< 13)
{
//do this code//
alert("ask your parent if you can play.");
}
else
//"otherwise"//
{
//do this code//
alert("Let's have some fun!");
}
alert("You are at a Justin Bieber concert, and you hear this lyric 'Lace my shoes off, start racing.'");
alert("Suddenly, Bieber stops and says, 'Who wants to race me?'");
var userAnswer= prompt("Do you want to race Bieber on stage?");
userAnswer= "yes";
if (userAnswer=== ("yes"))
{alert("You and Bieber start racing. It's neck and neck! You win by a shoelace!");}
else {alert("Oh no! Bieber shakes his head and sings 'I set a pace, so I can race without pacing.'");}
var feedback= prompt("Please rate my game out of 10");
var feedback= 8;
if (feedback > 8)
{alert ("Thank You! We should race at the next concert!");}
else {alert ("I'll keep practicing coding and racing.");}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment