Function Data Flow
How function work in JavaScript
Here is Default syntax of function:
Steps:
1st: When we call the function with arguments(10,20), both arguments stored in
parameter (parameter1, parameter2
๐
2nd: then it stored in function body where it called like we called both parameter with
return statement
๐
3rd: when we use return statement then the operation of parameter (here we sum both parameter)
stored in function name(function_name)
๐
Final step: when we call or invoke the function name with arguments it shows the function body operation with arguments finally in console
1st Step ๐Final step
Now you can store the return operation in a variable and then print it in Console
๐Now call this above function with arguments(10,20)
then- store sum operation of function body that
we pass with return statement --finally stored in
in function name and now we can call it when we need
or
๐Store function body operation(here sum operation) in a variable then return it with return
statement in function_name
Comments
Post a Comment