这一段是什么意思
function typeOf(ele) {
var r;
if (ele === null) {r = "null"}
else if (ele instanceof Array) {r = "array"}
else if (ele === window) {r = "window"}
else if (ele instanceof Date) {r = "date"}
else {r = typeof ele};
return r;
}
如果typeof是object,这样判断怎么知道具体像是date,window有多少呢?