I just read about Eric Florenzano’s programming meme, and it seemed pretty funny. Then I noticed that there is no JavaScript implementation yet - unacceptable! So here it is.
var name = prompt(“Please enter your name:”);
var age = parseInt(prompt(“Please enter your age:”));
for (var i = 0; i < age; i++) {
document.write(i + ") Hello, " + name + "<br />“);
}
Update: Here are a few very cool implementations:
that looks so close to my lisp implementation that it kinda boggles my mind. very cool.
Code for matlab/octave:
name = input(‘Please enter your name: ‘, ‘s’);
age = input(‘Please enter your age: ‘);
for i = 1:age
fprintf(‘%2d) Hello, %s\n’, i, name)
endfor
© Copyright 2001-2010 Taylan Pince. All rights reserved.
I couldn’t believe there was no Javascript implementation either! Thanks for the entry.