📜  javascript 检测对象是否为日期 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:32.385000             🧑  作者: Mango

代码示例2
//checks if is object, null val returns false
function isObject(val) {
    if (val === null) { return false;}
    return ( (typeof val === 'function') || (typeof val === 'object') );
}
var person = {"name":"Boby Snark"};
isObject(person);//true