468060 (64) [Avatar] Offline
#1
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 (123) [Avatar] Offline
#2
While that's correct, there is nowhere in the book where I take advantage of var's hoisting.
468060 (64) [Avatar] Offline
#3
People will assume that, when you say this, you don't just mean in the examples in your book, but in general.