map new array with 3 parameter code example
Example: array map
let A = [{ x:'x', y:'y' }, { x:'x', y:'y' }];
let result = A.map(({y,...rest})=> ({...rest,v:y}));
console.log(result);
let A = [{ x:'x', y:'y' }, { x:'x', y:'y' }];
let result = A.map(({y,...rest})=> ({...rest,v:y}));
console.log(result);