instanceof 功能 a instanceof b 官方解释为检查构造函数b的prototype 有没有出现在a的原型链上.比如: function A() { } function B() { } function C() { } //B继承A B.prototype = new A() let instance = new B() console.log('---instance instanceof B-----', instance instanceof B) //true con…