title: Default argument values in JavaScript functions
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/894860/how-do-i-make-a-default-value-for-a-parameter-to-a-javascript-function">How do I make a default value for a parameter to a javascript function</a>  </p>
  </blockquote>
  
  
  
  <p>in PHP:</p>
  
  <pre><code>function func($a = 10, $b = 20){
    // if func() is called with no arguments $a will be 10 and $ b  will be 20
  }
  </code></pre>
  
  <p>How can you do this in JavaScript?</p>
  
  <p>I get a error if I try to assign values in function arguments</p>
  
  <blockquote>
    <p>missing ) after formal parameters</p>
  </blockquote>