I want to check an argument, if it was undefined (or false), I will assign a value to it by deconstructing an object
function test(x){
let obj={x:1,y:2}
if(!x){x}=obj;
}
note: I don't want to use a temporary variable
if(!x){
let {temp}=obj;
x=temp
}