Loading problem…
Implement a simplified version of JSON.parse that converts JSON strings back to JavaScript values.
JSON.parse
Given a JSON string, parse it and return the corresponding JavaScript value. Your implementation should handle:
parse('42'); // 42 parse('"hello"'); // "hello" parse('true'); // true parse('null'); // null parse('[1,2,3]'); // [1, 2, 3] parse('{"a":1,"b":2}'); // {a: 1, b: 2}
4 hints available with Pro