Destructuring also clones the specified primitive values of the argument object passed into the function. This can help prevent side effects. Note: objects and arrays that are destructured from the argument object are NOT cloned.
Primitive arguments of functions are already cloned. This is not es6 object deconstruction specific behavior.
let a = 5;
const increment = (num)=> ++num;
console.log(increment(a));
console.log(a);
Primitive arguments of functions are already cloned. This is not es6 object deconstruction specific behavior.