Could you just as easily have used var name instead of const name and made sure that name was local to the function?
I thought variable names are local to functions and therefore you can declare and use the same names within different functions without affecting each other. In that case, it would seem that the error is simply forgetting to use a declaration of a new variable. So the mistake of forgetting to do so would just as easily happen whether you use var or const.
In that case, it seems like a better example of the use of const would be in creating the global variable. Or am I misunderstanding?
as far as i see you are telling it taxRate = 'mike'; so you will always get mike. But once you set a var inside you are creating a different object.