标签:cal == 时间类型 object ret return func obj OLE
var test1 = '你好'
var test2 = new Date()
function isDate(data) {
return Object.prototype.toString.call(data)
}
isDate(test1)
isDate(test2)
var result = isDate(test2)
if (result == '[object Date]') {
console.log('I am date')
}
标签:cal == 时间类型 object ret return func obj OLE
原文地址:https://www.cnblogs.com/antyhouse/p/10931966.html