Skip to main content
2 of 3
added 16 characters in body
Michael Borgwardt
  • 51.4k
  • 13
  • 127
  • 178

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:

A proof in group theory using lots of "let"s

Michael Borgwardt
  • 51.4k
  • 13
  • 127
  • 178