A function in JavaScript is a set of instructions that performs a task or calculates a value. Every time you “call” the function, you are asking the computer to run it again. Passing a function means a function can be passed to another function as a new argument. This will allow the function being called to use the function argument to complete its task. The return keyword prompts the function to end and give the result of the function.
Link to image: https://www.tutorialstonight.com/js/js-function.php
Leave a Reply
You must be logged in to post a comment.