Syntax errors can be caught in JavaScript? -
a syntaxerror thrown when javascript engine encounters tokens or token order not conform syntax of language when parsing code.
but if there's syntax error, how program run in first place?
how can javascript syntax errors caught?
it's runtime errors can caught try-catch, not syntax errors (if eval
code can handle syntax errors in evaled code that's weird).
i'd recommend read these:
Comments
Post a Comment