try {
console.log(Hello World);
}
catch (error) {
console.log(error.name);
console.log(error.message);
}
Output:
Uncaught SyntaxError: missing ) after argument list
No idea why SyntaxError is not being catch.
Is there any mistake in my code or due to some JavaScript concepts I am getting this error