Skip to content

Instantly share code, notes, and snippets.

@MichaelCharles
Created May 19, 2023 01:14
Show Gist options
  • Save MichaelCharles/f0186866cf696f4fd87f10b1fdd8eefe to your computer and use it in GitHub Desktop.
Save MichaelCharles/f0186866cf696f4fd87f10b1fdd8eefe to your computer and use it in GitHub Desktop.
let person = { name: '太郎', age: 20 };
let copiedPerson = { ...person, name: '次郎' };
console.log(copiedPerson); // { name: '次郎', age: 20 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment