What will be the output of the following code?
try {
const result = 10 / 0;
console.log(result);
} catch (error) {
console.log('An error occurred:', error.message);
}
What will be the output of the following code?
try {
const result = 10 / 0;
console.log(result);
} catch (error) {
console.log('An error occurred:', error.message);
}