javascript 配列操作系まとめ

['A','B','C'].reduce(function(x,y){x["'"+y+"'"]=y;return x},{})

in_arrayはちょっと面倒だけど、sortは多次元配列のソートも簡単にできてとても楽