title: Proper way to define default values for function arguments in JavaScript
body: <p>Since years from when I first met JavaScript I always used default values for function arguments, like:</p>
  
  <pre><code>function addToCartCallback3(responseData, toCartBtn = null) {
      // ...
  }
  </code></pre>
  
  <p>But I noticed that now my PhpStorm warns me that this is wrong, and after 
  <code>toCartBtn</code> comma <code>,</code> or closing parenthesis <code>)</code> is expected.</p>
  
  <p>The code above works fine in Chrome and Firefox but kills all the JavaScript in IE11. <em>(In IE11 the console tells me the same as PhpStorm)</em></p>
  
  <p>Why is this code wrong, or what should I use?</p>
  
  <p>I know that <code>(typeof toCartBtn == 'undefined')</code> should do the trick, but I'm really curious why is the other method all of a sudden considered syntactically wrong.</p>