var multipliers = function (max) { var result = []; for (var i = 0; i < max; i++) result.push ((x) => x * i); return result; } multipliers(10) [2] (5);
Output