手写 instanceof 操作符实现 bxzhao 2022-07-14 93 阅读1分钟 题目描述:手写 instanceof 操作符实现 实现代码如下: function myInstanceof(left, right) { while (true) { if (left === null) { return false; } if (left.__proto__ === right.prototype) { return true; } left = left.__proto__; } }