Using the keyword let
to declare constants is not a general convention. The keyword let
is used that way in Swift, but in Javascript it denotes a regular variable (just one with a special scope).
As for where the use of let
to declare variables come from, it's a very old tradition for mathematical proofs: