It does set your variables as immutable, just not your values. It makes sense if you see variables in these languages for what they are: references to values.
It's a lazy example, that has the potential to confuse. I would agree with the downvoters I'm being petty, but c'mon... it's the very first thing you read in your JavaScript guide & it's flawed.