32 ms·
As others have said, each time through the loop ‘resets’ the scope. But on this subject, at this point, my rule of thumb is to always use ‘const’ first, until
by 40four 6y ago
As others have said, each time through the loop ‘resets’ the scope.
But on this subject, at this point, my rule of thumb is to always use ‘const’ first, until I find myself in a situation where I’m forced to change it to ‘let’.
If I’ve gotten into a situation where it seems like I need to use a ‘var’, then I seriously take a minute to rethink the implementation :)