When working with Javascript functions, I aim to provide multiple parameters while ensuring clarity in terms of the passed values. Therefore, I have created the following function:
var callMe = function (param1, param2, param3) {
console.log(param1 + ", " + param2 + ", " + param3)
}
To call the method callMe(), I use the following syntax, where parameter values are initialized within the function call:
callMe(param1 = 1, param2 = 2, param3 = 3)
My intention is to ensure clarity when providing multiple parameters and avoid any confusion that may arise.
Is there a downside to this approach, or am I simply trying to overcomplicate things?