repeat()

Bitsbox's repeat command makes it easier to tell any custom function in your code to run more than once. There are two parameters (options) in the repeat command: The first is the name of the function you want to repeat. The second is the number of times you want it to repeat.

The repeat command also has a special trick up its sleeve. It automatically passes its function a number that increases by 1 every time the function is run. You can use this parameter to customize the output of the function.

Here's a little program that draws eight pigs on the screen.

When your function is called, it is passed a count parameter you can do math with.