That's the whole point of the exercise, right? :D
Oh absolutely! Got any code golf solutions?
Hmm... the best I can come up with right now is 85 chars. Nothing really clever, just sacrificed readability for space.
let i=0;while(i++<101){console.log(i%15==0?'fizzbuzz':i%5==0?'buzz':i%3==0?'fizz':i)}
Another fun one, albeit longer, is this.
console.log(new Array(101) .fill(1) .map((_, i) => i % 15 == 0 ? 'fizzbuzz' : i % 3 == 0 ? 'fizz' : i % 5 == 0 ? 'buzz' : i ) .slice(1) .join('\n'))
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's the whole point of the exercise, right? :D
Oh absolutely! Got any code golf solutions?
Hmm... the best I can come up with right now is 85 chars. Nothing really clever, just sacrificed readability for space.
Another fun one, albeit longer, is this.