why we need to use arguments inside a function ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why we need to use arguments inside a function ?

I finished learning Jequery I practiced all the things I learnt but I still a little bit confused about arguments, I want to know exactly what is the importance of using arguments in a function , for example if I want to use preventDefault(); on an element is it obligatory to use event ? or there is an other way to use the preventDefault function without passing any argument through the function ?

30th Oct 2018, 10:18 PM
Hassan Sahlaoui
Hassan Sahlaoui - avatar
2 Answers
+ 2
An other interesting and short answer as usual thank you for being here , thanks a lot for your help 😚☺ !
30th Oct 2018, 11:37 PM
Hassan Sahlaoui
Hassan Sahlaoui - avatar
+ 3
Arguments are actual parameters that are passed to the calling method/function usually resulting in somthing being returned
30th Oct 2018, 10:30 PM
D_Stark
D_Stark - avatar