ES6 instanceof 操作符
ES6 instanceof 操作符
'use strict'
class Person{ }
var obj = new Person();
var isPerson = obj instanceof Person;
console.log(" obj is an instance of Person " + isPerson);
'use strict'
class Person{ }
var obj = new Person();
var isPerson = obj instanceof Person;
console.log(" obj is an instance of Person " + isPerson);