var thing; console.log(thing); // undefined console.log(stuff); // Reference error: undeclared.
The next thing you can do after you declare a variable, is assign it a value. You can shortcut declaring a variable and go straight to its assignment. This is highly unrecommended, without much nuance to argue the other way i.e. don’t pollute the global scope. Note in strict mode this will throw a ReferenceError.
var nothing = null; console.log(nothing == undefined) // true console.log(nothing == false) // false console.log(!!nothing == false) // true
Some believe (myself included) it is a good habit never to leave variables unassigned (undefined) and be explicit in using null.