468060 (121) [Avatar] Offline
On p.297 it says 'If you replaced them all with var the code would run the same, they just make your code more hygienic..."

This is not at all the case. Let and const have block-level scope but no hoisting, unlike var. They are not interchangeable.
elijah.meeks (127) [Avatar] Offline
While that's correct, there is nowhere in the book where I take advantage of var's hoisting.
468060 (121) [Avatar] Offline
People will assume that, when you say this, you don't just mean in the examples in your book, but in general.