Checks if the specified value is null
or undefined
.
val
is equal to null
or undefined
.const isNil = val => val === undefined || val === null;
isNil(null); // true
isNil(undefined); // true
isNil(''); // false
JavaScript, Type
Checks if the specified value is null
.
JavaScript, Type
Checks if the specified value is undefined
.
JavaScript, Type
Checks if the provided value is of the specified type.