Tired of hacking together deep copies with JSON.parse(JSON.stringify(...))? ๐Ÿ”

The structuredClone() method lets you safely clone complex JavaScript objects.

No data loss. No surprises. Just clean, reliable cloning.

Learn more ๐Ÿ‘‡
developer.mozilla.org/en-US/do

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/mdn/statuses/115655757680530034 on your instance and quote it. (Note that quoting is not supported in Mastodon.)