A few weeks ago, I went on Udemy course on Swift, the instructor mentioned that constants are called let
in Swift because it's standard in OOP (JavaScript uses it for example).
I know this may seem like a really stupid question, but I think it is confusing that constants are declared by let
. As, let doesn't stand for constant.
Where did the let
keyword come from?
let
is used specifically for constants?let
to declare variables is Javascript, but in Javascript a variable declared withlet
is not in fact a constant.