Which built-in error type does each of these mistakes throw?
const mistakes = [
() => null.length,
() => notDeclared + 1,
() => {
const limit = 1;
limit = 2;
},
() => new Array(-1),
() => JSON.parse("{'a': 1}"),
() => decodeURIComponent("%"),
];
for (const mistake of mistakes) {
try {
mistake();
} catch (error) {
console.log(error.name);
}
}
The answer
Work out every line it logs, in order. Then check.
Checking your sign-in…