Javascript Data Type Checker Is Null

Description

Javascript Data Type Checker Is Null


// Checks to see if something is null
Object.isNull = function(obj) {
    return (typeof obj == 'object' && !obj)
}

let a = null;/*  w w w. j ava 2 s.c o  m*/

console.log(Object.isNull(a));



PreviousNext

Related