function new_instanceof (leftValue, rightValue) {
let rightProto = rightValue.prototype
leftValue = leftValue.__proto__
while(true) {
if(leftValue == null) return false
if(leftValue == rightProto) return true
leftValue = leftValue.__proto__
}
}
instanceof 实现
最新推荐文章于 2024-07-23 17:29:44 发布
关键词由CSDN通过智能技术生成