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 ?
Asked
Active
Viewed 40 times
0
-
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