3 ms·
That's exactly what I meant by "any "var" could be replaced with "let" at a different scope": let foo; if (checkForSomething()) { foo = 2; }
by int_19h 5y ago
That's exactly what I meant by "any "var" could be replaced with "let" at a different scope":
let foo;
if (checkForSomething()) {
foo = 2;
} else {
foo = 3;
}