function getRectArea(width, height) {
if (isNaN(width) || isNaN(height)) {
throw "err"
}
}
try {
getRectArea(3, "A")
} catch (e) {
console.log(e)
}
when I use such a piece of code, I will report an error: Expected an object to be thrown;
I have no problem executing this code in the console, and the above error will occur in the editor. I don"t know what the problem is and whether it is caused by my eslint configuration.