I am trying to write a FizzBuzz program with CoffeeScript like this:
array = [1..100]
console.log(array.forEach(
(value)->
if value%3 is 0 and value%5 is 0
return "fizzbuz"
if value%3 is 0
return "fizz"
if value%5 is 0
return "buzz"
value
))
And it keeps returning undefined. Why does this happen?