function Cat() {}
var cat = new Cat()
console.log(cat instanceof Cat) //true
console.log(cat instanceof Object) //true
console.log([] instanceof Array) //true
console.log([] instanceof Object) //true
console.log({} instanceof Object) //true
instanceof
最新推荐文章于 2024-08-16 19:02:09 发布