Why is it possible to declare variable named let when I can't declare const or var. I know I will never do that , but I am just curious if there is reasonable explanation. So I can do:
var let = 5;
let x = 3;
x + let -> 8
From the Mozilla Developer Network site under
Future reserved keywords:
The following are only reserved when they are found in strict mode code:
var are listed under
Reserved keywords as of ECMAScript 6 and this document shows the history where they were originally reserved in ECMAScript 1.
To invoke strict mode for an entire script, put the exact statement
'use strict';) before any other statements.
What is strict mode?