Tuesday, April 15, 2014

Day 10

Learned about Functions and did some debugging . Completed all 9 puzzles on Stage 17. This was the last lines of code I wrote today

var counter;
var height;

function remove_pile(height) {
  for (var count = 0; count < counter; count++) {
    dig();
  }
}

for (counter = 1; counter <= 6; counter++) {
  remove_pile(counter);
  moveForward();
}

No comments:

Post a Comment