TLDW
let
is a keyword that we use to declare variables in memory.
This may be done in the global scope. In that case, if we don't use the assignment operator =
, our variable will be bound to the primitive data type, undefined
(absence of a value - ironically, it itself is a value! π€·π½ββοΈ).
We can also see undefined
if we access a πin an object that doesn't exist...it doesn't have a *value...*there is an 'absence of a value.'
However, if we access a variable in the global scope that doesn't exist, we are 'referencing a variable erroneously.' That...is when we will see a ReferenceError
with a message saying that something is not defined
.
Top comments (0)