is this expected?
const testObj = {
a: 'hi',
b: 'there'
}
function destructured_test({a, b}) {
a = 'bye';
}
console.log(testObj);
destructured_test(testObj);
console.log(testObj);
function test(t) {
t.a = 'bye';
}
console.log(testObj);
test(testObj);
console.log(testObj);
only the function 'test' mutates testObj 'destructured_test' seems to be copying the properties over instead of preserving the reference