To get the full benefit of the lesson, watch the video
Lesson 36: Introduction to functions
NOTE: for a fast copy, follow these steps in order:
- Click anywhere in a text box below (result will be a blinking vertical line in the text box)
- Hit ctrl + A on the key board (the "ctrl + A" means hit Ctrl and A at the same time)
(The result should be that all the text inside the text box lights up in blue)
- Hit Ctrl + C (Nothing significantly happens that is visible) and now its copied to the clipboard and your ready to paste it anywhere you wish
All functions (except of the type void) require a return value. Functions can be called by the user anytime.. In this lesson, the return value is useless.
Different examples of functions |
Go ahead and copy and paste these pieces of code and compile them for extra practice