Questioning the function of "let" when declaring a variable

By default, JS code run by a browser uses the “sloppy mode”, which doesn’t require a variable to be declared before using it:

BtW, JS got various keyword commands which can be used to declare a variable:
var, let, const, function, class, import.

1 Like