0

there is a function where the definition states 3 parameters.

ex:

function func(param1,param2,param3){
   //does somethings
}

I would like to call that same function with just providing the third parameter only. The solution I though of is the following.

func(undefined,undefined,valueForParam3);

I don't think this is the proper way to handle such a scenario. Providing that I've handled undefined in the function implementation where it sets defaults. Please guide me on this.

thefourtheye
  • 206,604
  • 43
  • 412
  • 459
Imesh Chandrasiri
  • 5,280
  • 13
  • 51
  • 96

0 Answers0