Hour of Code: Code with Mary

Part 6: Mutate the Bugs



Often times inside a program, we want to run the same code sections many times in different places. We usually want to eliminate this duplicate code to save time, reduce errors and make things easier to change.

We do this by writing procedures that we call whenever we want code to run. In Quorum, these are called actions.

You didn't realize it, but we have already been using an action called Main. The computer always starts running our program from our Main action. We haven't had to use it so far, because Quorum automatically puts our code inside a Main action if we don't use any other actions.

Now that we are going to use other actions though, we always need to include it.

Try it Yourself

Next Tutorial

In the next tutorial, we will discuss Hour of Code Part 7, which describes first steps in Quorum.