Skip to content

`undefined` Does NOT Mean 'not defined' πŸ˜•

codefinity profile image Manav Misra twitter logo github logo ・1 min read  


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 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.' when we will see a ReferenceError with a message saying that something is not defined.

twitter logo DISCUSS
markdown guide
Classic DEV Post from Jul 26 '19

🎩 JavaScript Enhanced Scss mixins! 🎩 concepts explained

In the next post we are going to explore CSS @apply to supercharge what we talk about here....

Manav Misra profile image
I'm a full-stack JavaScript boot camp instructor. I also teach entry-level JavaScript at a college and take on a few front-end development client projects.