Answers

Question and Answer:

  Home  Website Developer

⟩ Tell me how Do You Distinguish Between An Undefined And Undeclared Variable?

Undefined refers to a variable which has declaration but not initialized yet. However, an undeclared variable is one which has a reference in the code without being declared.

Example.

var iExistButUndefined;

alert(iExistButUndefined); // undefined

alert(iMNotDeclared); // accessing an undeclared variable

 136 views

More Questions for you: