var mdate = new Date();
console.log(isDate(mdate));
function isDate(mdate) {
let fn = mdate.constructor;
let str = fn.toString();
let ar = str.indexOf("Date") != -1;
return fn +' ******* '+ str+'----'+ar
}
运行结果如下:
image.png
网友评论