title: How to display a returned value in an html page
body: <p>I just started learning javascript and followed an exercise on codeacademy to make a text base rock paper scissors game.
  I wanted to show it to someone, outside of the debug console but I can't figure out how to display it in an html page.</p>
  
  <p>The code in my html file is:</p>
  
  <pre><code>&lt;HTML&gt;
  
      &lt;HEAD&gt;
          &lt;script src="rockpaperscissors.js"&gt;&lt;/script&gt;
      &lt;/HEAD&gt;
  
      &lt;BODY&gt;Choose rock, paper or scissors and write your choice in the text box
          &lt;p&gt;
               &lt;A HREF="javascript:processOrder();"&gt;Click here to begin&lt;/A&gt;
      &lt;/p&gt;
      ...
      &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>and the code in my JS is:</p>
  
  <pre><code>var userChoice = prompt("Do you choose rock, paper or scissors?");
  var computerChoice = Math.random();
  
  if (computerChoice &lt; 0.34) {
      computerChoice = "rock";
  } else if (computerChoice &lt;= 0.67) {
      computerChoice = "paper";
  } else {
      computerChoice = "scissors";
  }
  
  var compare = function (choice1, choice2) {
      if (choice1 === choice2) return "The result is a tie!";
      if (choice1 === "rock") {
          if (choice2 === "scissors") return "rock wins";
          else return "paper wins";
      }
      if (choice1 === "paper") {
          if (choice2 === "rock") return "paper wins";
          else return "scissors wins";
      }
      if (choice1 === "scissors") {
          if (choice2 === "rock") return "rock wins";
          else return "scissors wins";
      }
  };
  
  compare(userChoice, computerChoice);
  </code></pre>
  
  <p>I get the prompt to choose rock paper or scissors but it does not return anything after that. I don't see the computer choice in the html and I don't know what to use to show it.</p>