Why do we need Spread Operator?


Why do we need Spread Operator?

why can we not write directly

let cloneUser = userDetails;

Try it. Try changing one of the objects and see what happens to the other.