spread operator clone
// spread operator

let method1 = {...car}
// method1 === car  // false
// method1.model = "F150"
// let sprd = {...car, color: "black", model:"ranger"}
if the comparison returns false so it cloned successfully because they will refer to a different location on memory. So we can add or update properties with another parameters after spread operator..
by Luka Tatarishvili
4 years ago
JavaScript
Objects tutorial 6
0
Pro tip: use ```triple backticks around text``` to write in code fences