这项工作需要考虑if k isnt 'notifications_table
v for k,v of tablesDict if k isnt 'notifications_table'
如何让它像python for
一样工作,if statment
在同一行中给出条件。
答案 0 :(得分:1)
尝试:
v for k,v of tablesDict when k isnt 'notifications_table'
从CoffeeScript docs中过滤示例:
# Health conscious meal.
foods = ['broccoli', 'spinach', 'chocolate']
eat food for food in foods when food isnt 'chocolate'