Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (A) SyntaxError
Explanation: The method JSON.parse()throws a SyntaxError exception if the string to parse is not valid JSON.
Explanation by: Mr. Dubey
The method JSON.parse()throws a SyntaxError exception if the string to parse is not valid JSON.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
150
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate