I try currently to make a function in which I pass only the second argument of my function. I have read some documentation but nothing probing to me.
I would make t
If you are OK with a change to the number of arguments that your function takes, you could pass the arguments via object properties. Then you can let the caller decide which property (or properties) to specify during the call.
The other properties can take default values through object destructuring in the function's parameter specification:
function test({a = 1, b = 2}) {
console.log(`a = ${a}, b = ${b}`);
};
test({b:42}); // only specify what b is