JSFiddle - React, Tailwind, and code Playground

JavaScript

// ----------------------------------------
// FizzBuzz *without* using ifs challenge
// A loopier solution
// ----------------------------------------
// FizzBuzz http://c2.com/cgi/wiki?FizzBuzzTest
//
/* 
"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”." 
*/ 

var oneToHundred = []

//add all numbers
for(var i = 1; i < 100; i++){
    oneToHundred[i] = i;
}

//fizz the 3's
for(var j=3; j<=100; j+=3){
    oneToHundred[j] = "Fizz";
}

//buzz the 5's
for(var k = 5; k <= 100; k+=5){
    oneToHundred[k] = "Buzz";
}

//fizzbuzz the 3 and 5's (since 3 and 5 are relatively prime, every number divisible by 3 and 5 is divisible by lcm(3,5)=15)
for(var k = 15; k <= 100; k+=15){
    oneToHundred[k] = "Fizz Buzz";
}

//display 'em
oneToHundred.each(function(item, index) {
    document.write(item + "<br>");
});