摘要: var ops = { "plus": (x,y)=>x+y, "mul" : (x,y)=>x*y, "and" : (x,y)=>x&y } function operation(op, array) { return array.slice(1).reduce(ops[op], array[0]); } operation("plus", array); opera... 阅读全文
posted @ 2018-12-11 10:27 麦君 阅读(881) 评论(0) 推荐(0) 编辑