Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
console.log(
Array.apply(0, Array(20)).map(function (x, y) {
let fizz = { 0: "Fizz" }[y % 3] || "";
let buzz = { 0: "Buzz" }[y % 5] || "";
return fizz + buzz || y.toString();
}).join("\n")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment