News for hackers. Stuff that matters.
Re:Oh, Go Ahead, Overthink FizzBuzz (2008) by ggurgone on Thursday November 19, 2015 @02:52PM (#10597097)
No doubt about it. The question was about avoiding the if/else within the for loop body.

In js the for could be replaced with an array of 100 elems and a forEach:

Array.apply(null, { length: 100 }).forEach(function (_, i) { })

There are no comments on this comment yet.