Examveda
Examveda

What kind of an exception will be thrown if the string to parse is not valid JSON?

A. SyntaxError

B. ArrayOutOfBoundException

C. Both SyntaxError and ArrayOutOfBoundException

D. None of the mentioned

Answer: Option A

Solution(By Examveda Team)

The method JSON.parse()throws a SyntaxError exception if the string to parse is not valid JSON.

This Question Belongs to Javascript >> Parsing, Benchmarking And Logging

Join The Discussion

Related Questions on Parsing, Benchmarking and Logging