when we display a boolean value in console, it gives undefined , even if the value is assigne code example
Example 1: javascript typeof undfined
var x;
if (typeof x === 'undefined') {
// these statements execute
}
Example 2: javascript assignment operator if undefined
const variable2 = variable1 || 'new';