Let or nothing?

That behavior is nicknamed “sloppy mode”:

In order to activate “strict mode”, place "use strict"; as the 1st non-comment statement in a JS file.

We can also activate “strict mode” by loading a JS file as an “ECMA script module (ESM)”.

2 Likes