All challenges
Multiple ChoiceIntermediate 30s

Handling JSON.parse Errors

Choose the best answer for: safe JSON parsing
Options
  1. 1JSON.parse returns null whenever it is given invalid JSON
  2. 2JSON.parse automatically catches its own errors
  3. 3Wrap JSON.parse in try/catch to handle invalid JSON
  4. 4JSON.parse never throws on any invalid input at all

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle