#1 // Move to the gem. // Don't touch the walls! // Type your code below. this.moveRight(); this.moveDown(); this.moveRight(); #2 // Grab all the gems using your movement commands. this.moveRight(); this.moveDown(); this.moveUp(); this.moveUp(); this…