function Instanceof(obj, pro) {
obj = obj.__proto__;
pro = pro.prototype;
while (obj) {
if (obj === pro) return true;
obj = obj.__proto__;
}
return false;
}
console.log(Instanceof([], Function));
手写js的instanceof方法
猜你喜欢
转载自blog.csdn.net/weixin_43595755/article/details/118298088
今日推荐
周排行