title: Using Default Values and Spread Syntax in ES6
body: <p>While going through features of JavaScript, I used default arguments and spread syntax in same function.</p>
  
  <pre><code>let whatIsThis = (a, b = 2, ...c) =&gt; {
      console.log("a = " + a, "b = " + b,"c = " + c)
  }
  
  whatIsThis(a = 1, c = [2,3,4,5,6,7,8])
  </code></pre>
  
  <p>After running it, I expected output to be like this:</p>
  
  <pre><code>"a = 1"
  "b = 2"
  "c = 2,3,4,5,6,7,8"
  </code></pre>
  
  <p>But instead I got this:</p>
  
  <pre><code>"a = 1"
  "b = 2,3,4,5,6,7,8"
  "c = "
  </code></pre>
  
  <p>Why didn't this worked?</p>