Parameters

In coding, a parameter is an option that you specify when you write a command. Different commands have different parameters. Depending on the command, some parameters are required and some are optional.

Functions can also accept parameters when they are told to run. They use these parameters to return results that can be different each time. This is a more complicated concept, but it's an important part of coding.

This code moves a submarine across the screen as a song plays. Every command in the code includes one or more parameters (separated by commas, between the parentheses).

This code grows or shrinks the tree depending on where you tap on the screen. The function grow accepts a parameter called age, which it uses to change the size of the tree. The value of age is set only when you tap the screen and call (run) the function grow.