Advertisement
728x90
javascript
1try {
2
3setTimeout(() => {
4
5console.log("try block");
6
7throw new Error(`An exception is thrown`);
8}, 1000);
9} catch (err) {
10
11console.log("Error: ", err);
12}Choose the correct output:
A
try block, Error: An exception is thrownB
Error: An exception is thrownC
try block, Uncaught Error: Exception is thrownD
Uncaught Error: Exception is thrownAdvertisement
Responsive Ad
78of86