title: How to use a return value in another function in Javascript?
body: <p>I'm self-teaching myself JavaScript and out of curiosity I'm wondering what is the proper way of returning a value from one function to be used in another function. For example:</p>
  
  <pre><code>function firstFunction() {
    // do something;
    return somevalue 
  }
  </code></pre>
  
  <p>So how do I set up the second function to use somevalue? Thanks.</p>