Null and undefined are obviously wrong ways to use them
Example:
let ResultIsNumber17 = +(null + undefined);
// Operator '+' cannot be applied to types 'undefined' and 'undefined'.
let ResultIsNumber18 = +(null + null);
// Operator '+' cannot be applied to types 'null' and 'null'.
let ResultIsNumber19 = +(undefined + undefined);
// Operator '+' cannot be applied to types 'undefined' and 'undefined'.
Copy the code
Similarly, null and undefined will cause an error when used as objects with methods.
Example:
null.toBAZ();
undefined.toBAZ();
Copy the code