title: Why doesn't a Javascript return statement work when the return value is on a new line?
body: <p>Consider the following JavaScript:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function correct()
  {
      return 15;
  }
  
  function wrong()
  {
      return
            15;
  }
  
  console.log("correct() called : "+correct());
  console.log("wrong() called : "+wrong());</code></pre>
  </div>
  </div>
  </p>
  
  <p>The <code>correct()</code> method in the above code snippet returns the correct value which is <code>15</code> in this case. The <code>wrong()</code> method, however returns <code>undefined</code>. Such is not the case with the most other languages.</p>
  
  <p>The following function is however correct and returns the correct value.</p>
  
  <pre><code>function wrong()
  {
      return(
            15);
  }
  </code></pre>
  
  <p>If the syntax is wrong, it should issue some compiler error but it doesn't. Why does this happen?</p>