Program Flow: Functions
Understand how to define and use JavaScript functions to manage program flow and reuse code. Learn about arguments, return values, and invoking functions to build modular, maintainable scripts.
We'll cover the following...
We'll cover the following...
Now that you have an understanding of the basic data types and operations, we should try to make our programs a little more interesting. We will do this by manipulating the way in which the JavaScript program executes. One way we can accomplish this is through the use of functions.
Functions
Functions allow us to repeat tasks that involve a similar sequence of steps. You’ve already seen the console.log() function, which allows us to predictably log some output to the console.
Let’s look at an example of a function definition that finds ...