No doubt about it. The question was about avoiding the if&#x2F;else within the for loop body.<p>In js the for could be replaced with an array of 100 elems and a forEach:<p>Array.apply(null, { length: 100 }).forEach(function (_, i) { })