I don't understand. Whta's argument? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
14th Sep 2020, 10:51 AM
SS. D. Gimenez
SS. D. Gimenez - avatar
2 Answers
+ 1
It is not argument, it is arguments, with s. It is a special reserved keyword in functional scope. When a function is called, for example, findMax(4, 5, 6) The arguments passed into the function is converted to an array named arguments [4, 5, 6] https://code.sololearn.com/W28N94JjgF3M/?ref=app
14th Sep 2020, 11:21 AM
Gordon
Gordon - avatar
+ 1
Arguments is an array-like which contain the values of arguments passed to the function .In your code the arguments passed to findMax() are 4 5 and 6. It is good idea to use -Infinity the lowest value that will be remplaced by each arguments values passed to findMax.
14th Sep 2020, 11:25 AM
HBhZ_C
HBhZ_C - avatar