Skip to content

Instantly share code, notes, and snippets.

@blackbutterfly1
Forked from anonymous/index.html
Last active May 17, 2024 02:10
Show Gist options
  • Save blackbutterfly1/125ff2907e0c75ad6a36 to your computer and use it in GitHub Desktop.
Save blackbutterfly1/125ff2907e0c75ad6a36 to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/vumile
// 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//
confirm("ask your parent if you can play.");
}
else
//"otherwise"//
{
//do this code//
confirm("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?");
if (userAnswer=== ("yes"))
{alert("You and Bieber start racing. It's neck and neck! You win by a shoelace!");}
else {confirm("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");
if (feedback> 8)
{alert ("Thank You! We should race at the next concert!");}
else {alert ("I'll keep practicing coding and racing.");}
<!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//
confirm("ask your parent if you can play.");
}
else
//"otherwise"//
{
//do this code//
confirm("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?");
if (userAnswer=== ("yes"))
{alert("You and Bieber start racing. It's neck and neck! You win by a shoelace!");}
else {confirm("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");
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//
confirm("ask your parent if you can play.");
}
else
//"otherwise"//
{
//do this code//
confirm("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?");
if (userAnswer=== ("yes"))
{alert("You and Bieber start racing. It's neck and neck! You win by a shoelace!");}
else {confirm("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");
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment