0
有沒有辦法如何格式化多個內部for-in循環以寫入更多行?在Coffeescript中格式化多重for-in循環
例子:
numbers = [1..20]
addLetters= (number) ->
pairs = []
pairs.push number+"A"
pairs.push number+"B"
pairs
console.log pair for pair in addLetters number for number in numbers
所需的格式,是這樣的:
# NOT WORKING
console.log pair
for pair in addLetters number
for number in numbers