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
  • 233,700
  • 52
  • 457
  • 497
Imesh Chandrasiri
  • 5,558
  • 15
  • 60
  • 103

0 Answers0