title: JavaScript - How to store and use return value of the function in a variable
body: <pre><code>var today = new Date();
  var tomorrow = today;
  tomorrow.setDate(tomorrow.getDate() +1);
  
  function formatDateToString(date) { 
    var dd = (date.getDate() &lt; 10 ? '0' : '') 
        + date.getDate(); 
  
    return dd;
  }
  </code></pre>
  <p>how can I store and use the return value in a variable?</p>