#!/usr/bin/env js91
"use strict";
function fizz_buzz(n) {
return [...Array(n).keys()]
.map(x => {
const i = x + 1;
if (i % 15 === 0) {
return 'FizzBuzz';
} else if (i % 3 === 0) {
return 'Fizz';
} else if (i % 5 === 0) {
return 'Buzz';
} else {
return i;
}
});
}
function main(arg) {
fizz_buzz(parseInt(arg)).forEach((element) => console.log(element));
}
main(scriptArgs);
IyEvdXNyL2Jpbi9lbnYganM5MQoKInVzZSBzdHJpY3QiOwoKZnVuY3Rpb24gZml6el9idXp6KG4pIHsKICByZXR1cm4gWy4uLkFycmF5KG4pLmtleXMoKV0KICAubWFwKHggPT4gewogICAgY29uc3QgaSA9IHggKyAxOwogICAgaWYgKGkgJSAxNSA9PT0gMCkgewogICAgICByZXR1cm4gJ0ZpenpCdXp6JzsKICAgIH0gZWxzZSBpZiAoaSAlIDMgPT09IDApIHsKICAgICAgcmV0dXJuICdGaXp6JzsKICAgIH0gZWxzZSBpZiAoaSAlIDUgPT09IDApIHsKICAgICAgcmV0dXJuICdCdXp6JzsKICAgIH0gZWxzZSB7CiAgICAgIHJldHVybiBpOwogICAgfQogIH0pOwp9CgpmdW5jdGlvbiBtYWluKGFyZykgewogIGZpenpfYnV6eihwYXJzZUludChhcmcpKS5mb3JFYWNoKChlbGVtZW50KSA9PiBjb25zb2xlLmxvZyhlbGVtZW50KSk7Cn0KCm1haW4oc2NyaXB0QXJncyk7