Array Demo

Ten dumbest dog breeds

function main(){
  //create an array with 11 elements
  var dumbDog = new Array(11)

  //assign the elements individually
  dumbDog[1] =  "Afghan Hound";
  dumbDog[2] =  "Basenji";
  dumbDog[3] =  "Bulldog";
  dumbDog[4] =  "Chow Chow";
  dumbDog[5] =  "Borzoi";
  dumbDog[6] =  "Bloodhound";
  dumbDog[7] =  "Pekinese";
  dumbDog[8] =  "Beagle";
  dumbDog[9] =  "Mastiff";
  dumbDog[10] =  "Bassett Hound";

  //show all the dumb dogs
  for (i = 1; i <= 10; i++){
    alert(i + ") " + dumbDog[i]);
  } // end for

}// end main


Andy Harris