0

is it possible in javascript-vue.js to call a method by assigning it a different number of parameters than what it was in function definition ? (greater or lesser) I came with backend background "java" yet whenever the call isn't the same I get "The method X(int, int) is not applicable for the arguments" but it seem to be feasable in js, any confirmation/explanation ?

VLAZ
  • 26,331
  • 9
  • 49
  • 67
hai wayl
  • 1
  • 2
  • Use typescript ... It will provide compiletime type-safety ... – derpirscher Apr 01 '23 at 11:44
  • If you provide less arguments than the declared parameters, the excess parameters are `undefined`. If you provide more arguments, the excess ones are ignored. – VLAZ Apr 01 '23 at 11:48

0 Answers0