Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Create a Copy of an Object in JavaScript


    In this lesson, we'll go over two popular ways to create a copy of an object in JavaScript: Object.assign and using the spread operator. We'll also go over why using these are important, since JavaScript passes object values by reference. Finally, we'll go over nested objects, and why methods such as Lodash's cloneDeep are necessary.