Functions are the bread and butter of JavaScript programming. A function is a block of code that will perform a particular task. A function is executed when "something" calls it.
The concept of wrapping a piece of code in a value has many uses. It gives us a way to structure larger programs, to reduce repetition, to associate names with subprograms, and to isolate these subprograms from each other.
For Loops can execute a block of code a number of times. They are a great way to work with arrays of data!
Open this HTML file in Visual Studio Code, scroll down to the scripts at the end of the body and 'call' each function to see exactly what it does.
To see your code changes in a browser, open this HTML file in Chrome and use the inspector console.
After you feel like you really understand what each example function does, write a new function on your own: