DEV Community

Dillon
Dillon

Posted on

Keep it STRICT

'use strict';

is the way to turn strict mode on.

Strict mode does not fix hoisting :////

Note, hoisting is only really a thing with var. If you use let or const, hoisting doesn't happen.

let and const variables are block-scoped, which means that if you introduce them in a block (e.g., a conditional) it only exists in that block. This means that it won't seep into other elements of the code external to that block and muddy those.

Top comments (0)