Definition: Null: It is the intentional absence of the value. Це один з перших цін JavaScript. Undefined: It means the value does не exist in the compiler.
null == undefined evaluates as true because they are loosely equal. null === undefined evaluates as false because вони не є, в fact, equal. <null_variable> === null is the best way to strictly check for null.
Undefined vs null – the differences Зображення Type of undefined is undefined whereas that of null is object. Ми можемо find the datatypes of both undefined і null using the typeof operator.