title: How do I pass variables between functions in Javascript?
body: <p>Here are 2 functions in the simplest form. I'm working with jquery.</p>
  <p>What is the best way to pass var str from the first function to the second one?</p>
  <pre><code>function a() {
      var str = &quot;first&quot;;
  };
  
  function b() {
      var new = str + &quot; second&quot;;
  };
  </code></pre>