Discover JavaScript
Everything from movement through loops, conditions to nested structures in your winter journey with Java Script
Awesome! We have collected lots of beautiful ornaments for the tree. Now we need to collect some actual gifts to lay under it for this town's kind folks. Focus!
And as we come to the end of yet another adventure, you know it! We need to skate around to collect the last gift while we write another letter to complete our Christmas wishes.
Another mysterious plan! We need to collect three gifts by moving 8 steps forward, then turning right and moving another steps to collect the third gift - but be careful! We need a counter that aborts our plan once we have stepped over three thin ice patches.
So this is a bit different, I guess. Here we need to step forward and count up to three thin ice patches before turning right to take 4 steps and find the gift.
Now we need to fetch the gift and stop after our counter indicates that we have stepped over three thin ice patches. Remember to move straight. No skating around just for the fun of it!
We need to print the number of cracked ice patches we skate on to collect each gift. Remember to stay on course - there is broken ice everywhere!
Discover JavaScript
Everything from movement through loops, conditions to nested structures in your winter journey with Java Script