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();
Looks good to me ;)