Today I learned

As a dev you learning new things every day...

To read the error...

function a() {
    return [1,2,3]
}

function b(a,b,c) {
    console.log(a+b+c)
}
b(...a())