title: How do I get the value of math.random and test it in an if statement?
body: <p><em>EDIT</em> Here is new code but it is still not working for me.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;&lt;/title&gt;
  
  &lt;link rel="stylesheet" type="text/css" href="mycss.css"&gt;
  &lt;script src="myjavascript2.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;button onclick="myFunction()"&gt;Play&lt;/button&gt;
  &lt;p id="test"&gt;&lt;/p&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>var things = ['rock','paper','scissors'];
  
  function myFunction() {
  
  var i = Math.floor(Math.random()*things.length));
  document.getElementById("test"+(i+1)).innerHTML=things[i];
  }
  </code></pre>
  
  <p><em>I added this text so that it would let me post the edit, please ignore this.</em></p>