goldsmith/plugins/minify/testdata/source/fizzbuzz.js
2024-02-16 22:35:49 -08:00

17 lines
341 B
JavaScript

function fizzbuzz(n) {
for (var i = 1; i <= n; i++) {
if (i % 15 == 0) {
console.log("fizzbuzz");
}
else if (i % 3 == 0) {
console.log("fizz");
}
else if (i % 5 == 0) {
console.log("buzz");
}
else {
console.log(i);
}
}
}