Number(null) // 0 5 + null // 5 Undefined is a representation"Not defined here"Is the original value of NaN when converted to a value. Number(undefined) // NaN 5 + undefined // NaNCopy the code

The difference is that null is an object representing “empty” and is zero when converted to a value. Undefined is a raw value that means “not defined here”. When converted to a value, it is NaN.