array & While loop

Gracie Xia

i = 0;

String[] lilypad = ["purple", "purple", "purple", "rock", "red"];

while (lilypad[i] !== "red") {
  if (lilypad[i] === "rock") {
    frog.confused();
  }
  frog.jump();
  i++;
}


License

The images and resources in this website are free to use for educational purposes.
1. Right Click Image
2. Click "Save Image As"