JSHint keeps giving me these warnings about redeclaring const
variables, in cases like this:
if( outOfChocolat ) {
const cake = "Carrot Cake";
} else {
const cake = "Chocolat Cake";
}
Which shouldn’t be the case, because const
is block-scoped.
I’ve tried multiple settings, and this issue has me convinced it should work correctly.
Anyone got this working?