I am running Node 6.11.0, trying to do this in a dynamic fashion:
const parentFunc = (arg1, arg2, arg3, arg4) => {
childFunc('foo', arg1, arg2, arg3, arg4);
};
I've tried it like this (doesn't work):
const parentFunc = () => {
childFunc('foo', ...arguments);
};
And upon inspecting the arguments
object, I'm confused by what I get.
Is there a clean, dynamic way to do this so that the number of args can change? Does Node.JS handle arguments
differently than browser JS?
Thanks for any help!