What will happen when the following code is executed?
try {
throw new Error('Custom error');
} catch (error) {
console.log(error.message);
}
What will happen when the following code is executed?
try {
throw new Error('Custom error');
} catch (error) {
console.log(error.message);
}