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 2 - Ask</h1>
    <p>Ask for input using the prompt command.</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>
alert("You are " + age + " years old");
</pre></b> </li>
      <li>In the output windows click: "Run with JS"</li>
         <li>Change the question and anwser</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