JS Built-ins
JSONparsebeginner

JSON.parse() β€” string

πŸ“– Usage Example
JSON.parse('42')    // β†’ 42
JSON.parse('true') // β†’ true

JSON.parse() handles primitive JSON values like numbers, booleans, and null.

JSON.parse String

JSON.parse('"hello"') returns the JavaScript string 'hello'.

Challenge: Parse a JSON string value.

πŸ’‘ Hints (1)
  • β€’ JSON strings require double quotes inside the JSON text.