I have destructured my parameters in a function like so:
const obj = {a:1 , b:2, c:3, d:4}
function1(obj);
function1 ({a , b, c ,d}) {
console.log(a);
console.log(b);
}
now i need to pass all my params into another function. Is there a way I can acheive something like this?
const obj = {a:1 , b:2, c:3, d:4}
function1(obj);
function1 ({a , b, c ,d}) {
console.log(a);
console.log(b);
func2(allMyParams) //instead of func2({a,b,c,d})
}