title: How do I set the default value for an optional argument in Javascript?
body: <p>I am writing a Javascript function with an optional argument, and I want to assign the optional argument a default value. How can I assign it a default value?</p>
  
  <p>I thought it would be this, but it doesn't work:</p>
  
  <pre class="lang-js prettyprint-override"><code>function(nodeBox,str = "hai")
  {
      // ...
  }
  </code></pre>