+1 vote
in Programming Languages & Algorithms by
Undefined vs not defined in JavaScript

1 Answer

+1 vote
by (13.6k points)
 
Best answer

In Javascript, when you declare a variable without assigning a value to it, the Javascript engine by default assigns the value of Undefined to the variable.

A variable is not defined if it is never declared within a given scope.

...