I was wondering what would be better if I had a function that took 4 parameters a, b, c, d, but I had a situation where I did not have a value to pass for param c, but to pass a value to param d so:
function myFunction(a,b,c,d) {
Do you pass undefined for the parameter c, and then do a check inside the function or something like that?
source share