re: JavaScript FizzBuzz solution in details VIEW POST

FULL DISCUSSION
 

This should work as well:

console.log([...Array(100)].map((n,i)=>[++i,'Rat','Ghost','Spider'][!(i%3)+!(i%5)*2]).join('\n'))

Your solution has 120 characters, mine has 96 😉

 
code of conduct - report abuse