how can I get original object before destucturing?
const a = {mi: 2, ti: 'TI'};
function destruct({mi: a}) {
return a === 1 ? arguments[0]: 'Sorry';
}
console.log(destruct(a)) // return original obj or 'sorry'
How I can get the object itself? Before it was destructed? My only guess is arguments[0] as above? But may be there is a better way to destruct the object in argument parentethis, and get it afterwards?