【发布时间】:2013-04-22 20:22:14
【问题描述】:
这可能是一个答案非常简单的问题,但我无法理解为什么这不起作用;
sort = (arr) ->
word for word in arr
if word is 'some word'
console.log 'word present'
我想要做的就是 console.log 是数组中存在一个单词,但我只是得到 p>
Parse error on line 4: Unexpected 'INDENT'
有人可以解释或提示我为什么这不起作用。 谢谢:)
【问题讨论】:
-
我认为肯定有空白问题
-
@The-Val 不,问题不在于循环
标签: coffeescript