DEMO: A function is a defined block of code that has a specific task.
A function will not run until it is called. You can call a function anywhere in your code after you define it.
- Click Run to see the parts of a function. Follow the onstage directions to complete the demo.
- At the end of the demo, you will be asked to add a call line to the code.
- Click Submit and Next to answer the questions about functions in the next activity.