// Some silly JavaScript functions written in response to Jeff's
// assertion that repetition would be helpful.

function repeatImage(imageName) {
  var i;
  var result = "";
  for (i = 1; i <= 20; i++) {
    result = result + '<img src="' + imageName + '">\n';
  }
  return result;
} // repeatImage

function promptForImage() {
  var imageName = prompt('Enter the URL of your favorite image!',
                         'http://www.grinnell.edu/www/images/red-bar-with-leaf.gif');
  return repeatImage(imageName);
} // promptForImage

