instructions

We already know that Miorița can be programmed to execute certain commands.

But repeating them can be rather redundant and confusing. Sometimes we may not even know how many times we need to repeat them.

commands

for() { }

while() { }

var

challenge

Help Miorița get to the center of the spiral.

There are multiple ways to do it. Some are quicker, others require less code, and there are some you may think of after learning about functions in the next lesson.

Which one would you use?

Miorița

3/4

Loops & variables