coffeescript
正規表現で指定して一括でremoveClassをしたい時があったのでメモ。 $.fn.removeClassMatch = (rexp) -> this.removeClass (i, css) -> (c for c in css.split(' ') when c.match(rexp)).join(' ') githubで公開している方がいたのでリンク
_.each [1,2,3], (n)-> console.log n _.each {one:1, two:2, three:3}, (value, key)-> console.log key + '=' + value
CoffeeScriptだと三項演算子使えないのね。 if a == b then "true" else "false" こう書く位なら、 ` a === b ? "true" : "false" ` javascriptで書いたほうがよい?