You are viewing a single comment's thread from:

RE: Introducing the Coding Challenge

My Solution in plain old JS5 :)

function fizzbuzz(value) {
    if (value % 5 == 0 && value % 3 == 0) {
        console.log("FizzBuzz")
    } else if (value % 5 == 0) {
        console.log("Buzz")
    } else if (value % 3 == 0) {
        console.log("Fizz")
    } else {
        console.log(value)
    }
};

function TestNumbers() {
for (var i = 0; i < 101; i++) {
    console.log(fizzbuzz(i));
    }
};

TestNumbers();
Sort:  

Looks good to me ;)

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.028
BTC 61423.30
ETH 3383.10
USDT 1.00
SBD 2.54