Difference between undefined and not defined in JavaScript

Example :-

var x; // declaring x

1.console.log(x); //output: undefined .

2 console.log(y); // Output: Reference Error: y is not defined.

results matching ""

    No results matching ""