process.stdin.resume(); process.stdin.setEncoding('utf8'); function range(x, y, z) { var a = []; if (z == undefined) { z = 1 } if (z < 0) { for (var i = y;i>=x;i +=z) { a.push(i) } } else { for (var i = 0; x + i <= y; i += z) { a.push(x + i); } } return a; } function sum(a) { var s = 0; for (var i = 0; i < a.length; i++) { s += a[i]; } return s; } console.log(range(1, 100, -5))
Standard input is empty