title: How can I pass a value from one function to another function without declaring a global variable in JS??
body: <p>I just want to pass the value from my new1 and new new2 function to new3 function </p>
  
  <pre><code>function new1(){
    var a = 5;
  }
  
  function new2(){
    var c=6;
  }
  
  function new3(){
    if(a&lt;c){
      dosomething();
    }
  }
  </code></pre>