Basic Function


function verse1(){
  var output = "";
  output += "The ants go marching 1 by 1, hurrah, hurrah" + "\n";
  output += "The ants go marching 1 by 1, hurrah, hurrah" + "\n";
  output += "The ants go marching 1 by 1, the little one stops" + "\n";
  output += "to suck his thumb" + "\n";
  alert(output);
}

function verse2(){
  var output = "";
  output += "The ants go marching 2 by 2, hurrah, hurrah" + "\n";
  output += "The ants go marching 2 by 2, hurrah, hurrah" + "\n";
  output += "The ants go marching 2 by 2, the little one stops" + "\n";
  output += "to tie his shoe" + "\n";
  alert(output);
}

function verse3(){
  var output = "";
  output += "The ants go marching 3 by 3, hurrah, hurrah" + "\n";
  output += "The ants go marching 3 by 3, hurrah, hurrah" + "\n";
  output += "The ants go marching 3 by 3, the little one stops" + "\n";
  output += "to climb a tree" + "\n";
  alert(output);
}

function chorus(){
  var output = "";
  output += "... and they all go marching" + "\n";
  output += "down.  " + "\n";
  output += "to the ground." + "\n";
  output += "to get out." + "\n";
  output += "of the rain." + "\n";
  output += "Boom boom boom boom...." + "\n";
  alert(output);
};

verse1();
chorus();
verse2();
chorus();
verse3();
chorus();
chorus();