Mastery 22

In order to eceive credit for the 22nd mastery, when a certain type of repetition should be used must be described.

There are 2 ways of creating repetition

1: Loops

     Examples of loops are ‘for’ or ‘do and while’ loops. These repetitions sould be used when large amouns of repetitions are needed.

2: Recursion

     A recursion is where a function is created to recall itself. This repetition should only be used when the amount of repetitions needed are fairly small. This is because the recursion process must recall itself fully each time making the amount of time between completions of reetitions grow exponentially.

CC BY 4.0 Mastery 22 by Asa Puls is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.