Variable is undefined…
“Hoisting” is another topic that is best discussed later in a separate article. For now, for conversation sake let us just agree to use the definition from the MDN documents here:
“ a strict definition of hoisting suggests that variable and function declarations are physically moved to the top of your code, but this is not in fact what happens. Instead, the variable and function declarations are put into memory during the compile phase, but stay exactly where you typed them in your code”.
This brings up a really important point, what if you needed to declare a variable and set it to have a value that indicates, it has an absence of value?
My suggestion would be to use “null” according to MDN here