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