Transcript from the "Undefined vs Undeclared" Lesson
[00:00:00]
>> Kyle Simpson: Let's talk about two very special concepts around emptiness that come into play heavily when we're talking about scope. I just mentioned the idea of a variable never having been declared, the topic variable in that previous slide. It's never been declared. That is the state of undeclared, and a lot of people think the word undefined is the same concept.
[00:00:22] That being undefined or being undeclared are basically the same thing. They're very distinctly different. Specifically in a program something that is undefined is a variable that has been declared, but it doesn't have a value. And then a variable that is undeclared is one that was never declared anywhere.
[00:00:41] We just start trying to reference it. And the JavaScript engine has no idea where that is.