Hello class,
JavaScript works with functions. Functions are defined as set of codes designed to perform a particular task when something invokes or calls it. Functions must be given a name followed by parentheses. Within these parentheses parameters may be included. functions arguments are these values received by the same function when it is called. However, functions can also be called when an event happens or automatically. Often, functions return a value after they are called. But I asked myself why are we using functions? Because functions can be used and reused as many times as needed. There is no need to rewrite codes when the same process has to be repeated we can just simply call the function to perform this process. Moreover, functions can shorten our codes because it is used as a variable value. Functions are very useful tools in designing programs or websites.
(Image source: Adobe stock)
Yes, you are correct. We can also use functions to create our own custom formulas in Microsoft Excel, and overall knowledge of JavaScript functions can make our Excel skills better.