← You've been deep-cloning objects with a JSON hack. `structuredClone` does it right.Quiz

structuredClone vs the JSON hack

Six questions on what structuredClone actually preserves versus JSON.parse(JSON.stringify(obj)) — Dates, Maps, Sets, circular references, class instances, and the transfer option.

questions6
pass mark70%
feedbackinstant

No account needed. Every answer is explained as you go, with a reference to the spec or MDN — pass and you can claim a certificate.