这可能是一个答案非常简单的问题,但我无法理解为什么这不起作用;
sort = (arr) ->
word for word in arr
if word is 'some word'
console.log 'word present'
我想要做的就是 console.log 是数组中存在一个单词,但我只是得到
Parse error on line 4: Unexpected 'INDENT'
有人可以解释或提示我为什么这不起作用。谢谢 :)