+What is function?
+How to write functions in JavaScript?
+How to invoke functions?
+Benefits of functions?
▬▬▬▬▬▬ In this Video ▶️ ▬▬▬▬▬▬
What is function:
-A JavaScript function is a block of code designed to perform a particular task.
-Reuse code: Define the code once and use it many times.
-A JavaScript function is executed when "something" invokes it (calls it).
Function Syntax:
function name(parameter1, parameter2, parameter3)
{ // code to be executed }
-Function parameters are listed inside the parentheses () in the function definition.
-Function arguments are the values received by the function when it is invoked.
How function get invoke:
-When an event occurs (when a user clicks a button)
-When it is invoked (called) from JavaScript code
-Automatically (self invoked).
Function Return:
-When JavaScript reaches a return statement, the function will stop executing.
-If the function was invoked from a statement, JavaScript will return to execute the code after the invoking statement.
▬▬▬▬▬▬ Useful Links 🛠 ▬▬▬▬▬▬
Blog ► http://codenboxautomationlab.com/
GitHub Repo ► https://github.com/codenbox
▬▬▬▬▬▬ Connect with us 👋 ▬▬▬▬▬▬
~~~Subscribe to this channel, and press bell icon to get all updated videos on Selenium and Cypress Automation:
/ codenboxautomationlab
~~~ Follow us on Facebook & Twitter to get more updates:
/
/ codenboxteam