Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>JS Bin</title>
  </head>
  <body>
    <h1>Lesson 3 - If/Else</h1>
    <p>Learning If/Else</p>
    <ol>
      <li>Open the Javascript and output window</li>
      <li>In the Javascript window type: <b>
        <pre>
var age = prompt("How old are you?");
</pre></b> </li>
      <li>In the Javascript window type: <b> <pre>
if(age > 10)
{
  alert("You are super old!");
}
else
{
  alert("You are young!");
}
</pre></b>
      </li>
      <li>Run your script</li>
      <li>Create a new question and anwsers</li>
      <li>Run your script</li>
    </ol>
  </body>
</html>
  
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jamesfdickinsonpro
0viewers