Skip to content

Instantly share code, notes, and snippets.

@muloka
Created March 28, 2011 21:15
Show Gist options
  • Save muloka/891301 to your computer and use it in GitHub Desktop.
Save muloka/891301 to your computer and use it in GitHub Desktop.
function forEach(array, method) {
var l = {};
for( l.ii = 1; l.ii <= arraylen(arguments.array); l.ii++ ) {
method(arguments.array[l.ii]);
}
}
function writeNow(str) {
writeOutput(str);
writeOutput('+');
}
ar0 = [11,22,33,44,55,66];
forEach(ar0, writeNow);
// 11+22+33+44+55+66+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment