点击运行
class Person{ } var obj = new Person() var isPerson = obj instanceof Person; console.log("obj 对象是 Person 类实例化来的吗? " + isPerson);
运行结果 :
正在执行...