Let's say I have a function
function myfunction(a, b, c) {
// do stuff
}
What is the optimal way to call this function with only param c?
a = 1;
b = 2;
c = 'hello';
myfunction(c);
I was thinking this:
myfunction(undefined, undefined, c);
But there must be a better way. I was thinking passing an object, but this function is already being used, I can't change the param structure.
myfunctioncby curry-in the functionmyfunction:myfunctionc = c => myfunction(undefined, undefined, c); myfunctionc(c);