0

How do you call(run) a function in JavaScript after you have defined the function?

What is the syntax for calling(running) a function in JavaScript after you have defined the function?

20th Jan 2017, 5:39 PM
Superswimmer9876
Superswimmer9876 - avatar
3 Antworten
+ 7
function myFunc() { // your code } myFunc() ; ^ call is this way
20th Jan 2017, 5:44 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 2
A function without any parameters can be called as functionName(); and a function with parameters can be called as functionName(param1, param2) depending on the number of parameters you have used while defining a function.
25th Jan 2017, 7:12 AM
Vipul Pathe
Vipul Pathe - avatar
0
thanks!
20th Jan 2017, 8:54 PM
Superswimmer9876
Superswimmer9876 - avatar