small medium large xlarge

The latest version of the book is B2.0, released about 1 month ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: B1.0 (23-Jan-18)
PDF page: 68

In setting up filters, filters2, and update, it seems that ‘const’ would be a better choice than ‘let’. Perhaps I am missing something?--Fred George

joe morgan says: That's a tough one. `const` is a good choice because the value will not be reassigned. However, since it will be mutated, I like to alert code readers that the value will be changed that's why I went with `let`. To be honest, I still haven't decided which one I like better. I usually try to prevent the problem by not mutating objects (including map) and then I assign with `const`. Since I will be mutating these, I'll leave as `let`, but this is a decision each team needs to make. I think a lot of linters agree you should use `const`, though.