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 };
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter