How do I send one or more variables in a JavaScript function without sending null values to unused arguments?
I have a function:
function setProjectParameters(trigger, pp_ts, pp_t, pp_bs, pp_dg, pp_ll){alert("the rest of the code is here doing something");}
Sometimes I want to call this function and only send a value to pp_bs
, now I do it like this:
setProjectParameters(null,null,null,"8");
Can I do it something like this?: (It doesn't work so I guess not...)
setProjectParameters(pp_ts="44");
What is the proper way to do it?