Home > Syntax Error > Java Script Error Syntax Error

Java Script Error Syntax Error


While you normally can't catch syntax errors, as we'll see shortly, there are times that you can. The Error.name Property The benefit of having all the different error types is that you can pinpoint more accurately what kind of error you're dealing with. For example, the following line causes a syntax error because it is missing a closing parenthesis. When a syntax error occurs in JavaScript, only the SyntaxError.prototype.message Error message. his comment is here

Here is the try...catch...finally block syntax −