class scholl {
static [Symbol.hasInstance](option){
console.log(option); //"111"
return typeof option == "string"
}
}
console.log("111" instanceof scholl); //true
我明明没有给它传参,为什么会参数跑进出?,而且为什么会自动调用这个函数?
class scholl {
static [Symbol.hasInstance](option){
console.log(option); //"111"
return typeof option == "string"
}
}
console.log("111" instanceof scholl); //true
我明明没有给它传参,为什么会参数跑进出?,而且为什么会自动调用这个函数?
13 回答12.9k 阅读
8 回答2.7k 阅读
2 回答5.1k 阅读✓ 已解决
7 回答2.1k 阅读
5 回答1.3k 阅读
3 回答2.3k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决