O'Reilly logo
  • Bob Massarczyk thinks this is interesting:

We can write the same function using an ES6 arrow function along with the object spread operator. This rateColor function uses the spread operator to copy the color into a new object and then overwrite its rating:


Cover of Learning React


First, we all agreed to call specs after ES6 by the year since it is a yearly rolling release. Therefore, there is no ES7, it is ES2016. And no, ES2016/ES7 doesn't include the object spread operator.