egghead.io
  1. 1
    Copy an Array with the Spread Operator
    27s
  2. 2
    Nested Destructuring for Objects
    42s
  3. 3
    Copy an Object with the Spread Operator
    35s
  4. 4
    Merge Arrays using the Spread Operator
    25s
  5. 5
    Flatten a Nested Array in JavaScript with Array.prototype.flat
    50s
  6. 6
    Merge Objects with JavaScript's Spread Operator
    25s
  7. 7
    For...in Loop vs. For...of Loop
    1m 37s
  8. 8
    Array.prototype.flatMap from ES2019
    45s
  9. 9
    Convert an Object to an Array and back again with Object.entries and Object.fromEntries
    26s
  10. 10
    Safely Access a Property on a JavaScript Object with Optional Chaining
    31s
  11. 11
    Safely Access a Property on a JavaScript Array with Optional Chaining
    27s

Copy an Object with the Spread Operator

Laurie Barth
InstructorLaurie Barth
  • javascript
    JavaScript

Share this video with your friends

Send Tweet

Use the spread operator to copy a flat object. Note that this is a shallow copy.

illustration for ES6 and Beyond

Course

ES6 and Beyond

Build your Developer Portfolio and climb the engineering career ladder.
  • Search
  • Talks
  • Podcasts
  • Machine
  • Pricing
  • Store
©egghead.io
Terms & Conditions