const article = {
  title: 'How to Use the Spread Operator (...) in JavaScript',
  claps: 1000000,
  author: {
    name: 'Juan',
    publication: 'LiveCodeStream'

const articleCopy = { ...article }

articleCopy.title = 'Strange behaviours with spread operator and deep copy'; = 'JC';

console.log('Original title:', article.title);
console.log('Original author:',

console.log('Copy title:', articleCopy.title)
console.log('Copy author:',
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript