CHALLENGE
class CustomError extends Error {
constructor(message) {
super(message);
this.name = 'CustomError';
}
}
try {
try {
throw new CustomError('inner error');
} catch (e) {
console.log(e.name);
throw new Error('outer error');
}
} catch (e) {
console.log(e.message);
console.log(e instanceof CustomError);
}
What is the output?
Anonymous Quiz
43%
CustomError outer error false
32%
CustomError inner error true
17%
Error outer error false
7%
CustomError outer error true
❤3🔥1
🎨 Eyecons is a VS Code icon theme that automatically adapts the color of icons to fit your editor's main theme – well, from this list anyway.
👍7❤1🔥1