You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function_instanceof(instance,constructor){if(typeofconstructor!=='function'){thrownewTypeError(`Right-hand side of 'instanceof' is not callable`)}constisPrimitive=(value)=>value==null||(typeofvalue!=='object'&&typeofvalue!=='function')constconstructorPrototype=constructor.prototypeletprototype=instancewhile(!isPrimitive(prototype)){prototype=Object.getPrototypeOf(prototype)if(prototype===constructorPrototype)returntrue}returnfalse}
The text was updated successfully, but these errors were encountered:
定义
检测构造函数的
prototype
属性是否出现在某个实例对象的原型链上。实现
F.prototype
的原型The text was updated successfully, but these errors were encountered: