This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var functions = { | |
a1: function (number, max) { return print(number + 1, max); }, | |
aNaN: function (number, max) { return null;} | |
}; | |
function print(number, max){ | |
document.write(number + '<br />'); | |
var left = max - number; | |
var index = left/left; | |
return functions['a' + index.toString()](number, max); | |
} |