title: How to access the variable from one function to another function in Javascript?
body: <p>I have prompt dialog box which take Email value and need to pass the Email variable in another function Email(). Here is my code.</p>
  
  <pre><code>function promptMessage() {
      public var Email = prompt("Enter your Email :", "");
  }
  function Email(){
      alert("Email Address is " +Email); //Email from promptMessage() function 
  }
  </code></pre>