pass by reference is not working here when we assign obj2 to obj1 in a function it doesn't work outside the function and obj1 is retaining its original value but why?
let obj1 = {
value: 'a'
}
let obj2 = {
value: 'b'
}
obj3 = obj2;
function change(obj1, obj2) {
obj1 = obj2
obj2.value = 'c'
}
change(obj1, obj2);
console.log(obj1.value)