Javascript Data Type Checker Is Object
// Checks to see if something is an object Object.isObject = function(obj) { return (typeof obj == 'object' && !!obj) || (typeof obj == 'function'); } let a = {};/* w ww. java 2s . c o m*/ console.log(Object.isObject(a));