title: Is there a way to make a random number in JavaScript and then take it and use it to make another random number?
body: <p>I'm making a website for a fake company. One of the sections has a 'Stock Quote' feature that is just a random number. For this, I use the following code:</p>
  
  <pre><code>&lt;p ID="stockcurrent"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  document.getElementById("stockcurrent").innerHTML =
  Math.floor(Math.random() * 500) + 200;
  &lt;/script&gt;
  </code></pre>
  
  <p>Now, what I want to do, is to take the number generated for that and use it to create a new number, that has as condition that it has to be equal or larger than the generated number. Ie, something like this:</p>
  
  <pre><code>&lt;p ID="stockdayhigh"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  document.getElementById("stockdayhigh").innerHTML =
  Math.floor(Math.random() * 500) + (the result of the stockcurrent script);
  &lt;/script&gt;
  </code></pre>
  
  <p>Is this something possible to do? My knowledge of JavaScript is pretty basic. </p>