A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-100.js
1constr=JSON.parse('{"a":1,"b":2}',(k,v)=>
2typeofv==='number'?v*10:v);
3console.log(r.a,r.b);
Quirks
Answer & explanation
Console output
10 20
Why
JSON.parse accepts an optional reviver as its second argument. It is invoked for every key/value pair (deepest first), and its return value replaces the parsed value. Here every numeric value is multiplied by 10, so a becomes 10 and b becomes 20. Returning undefined from a reviver deletes that key.