Errata: Chapter 6


The final code example in the Shallow Copies and the Spread Operator section on page 160 shows a rest parameter with only two periods. There should be three. The correct code is:

function add(...numbers){
  return numbers.reduce(sum,next) => sum + next);
}

Leave a Reply

Your email address will not be published. Required fields are marked *