The for loop is used to repeat actions a number of times. The while loop is used like a for loop but instead you have to put how many times you want it to repeat the steps. Another one of the codes is ,hero.moveUp, and it makes the character move up. the fourth one is, hero.use, and it makes the character use whatever you put in the parentheses. The fifth one is, hero.moveLeft, and it makes the character move left. The final one is, hero.castMistIllusion, and it makes the character put a cloud around him so that he could sneak past enemies.