Checking for only null or undefined can be done like so: if (value == null) . Mind the == operator that coerces. If you check like this if (value === null || value === undefined) , you forgot/don’t know how Javascript coerces.
Checking for only null or undefined can be done like so: if (value == null) . Mind the == operator that coerces. If you check like this if (value === null || value === undefined) , you forgot/don’t know how Javascript coerces.