merging the objects

PHOTO EMBED

Fri Apr 02 2021 13:48:20 GMT+0000 (Coordinated Universal Time)

Saved by @swastik #javascript

const match1 = 
{ 
  name : "Sachin", 
  score : 56 
};


const match2 = 
{ 
    name : "Sachin", 
    score: 53,
    balls: 32 
};



const match = {...match1, ...match2};
console.log(match) ;
 // Output -> 
             {  name: "Sachin",
                score: 53,
                balls: 32
             };
content_copyCOPY

https://shihaan.hashnode.dev/understanding-the-three-dot-operator-better