| What is undefined and undeclared in JavaScript?
In JavaScript undefined variable are those variables which are declared in program but not given any of the value. And the program tries to read the value of these undefined variables then it will return undefined value.
But in JavaScript undeclared variables are those which are not exist in program and are not declared. And if program tries to read the value of an undeclared variable then runtime error is encountered. | | |