This is how you output some text to the console:
trace("foobar!");This is a variable:
var number_of_sheep=5;This is how you make a loop that counts from 1 to 10:
for(var count=1; count<=10; count++){}Now let's combine these concepts to count sheep.
for(var number_of_sheep=1; number_of_sheep<100; number_of_sheep++)This should output:
{trace("There are "+number_of_sheep+" sheep.");}
There are 1 sheep.Congratulations. You are now more talented than 199 out of 200 people who apply for programming jobs.
There are 2 sheep.
There are 3 sheep.
There are 4 sheep.
...all the way to 100.