摘要: ``` const pick = (obj, arr) => arr.reduce((acc, curr) => (curr in obj && (acc[curr] = obj[curr]), acc), {}); const pick = (obj, arr) => arr.reduce((k, v) => { //第一个参数为迭代对象第二个为目标对象 if ((v i... 阅读全文
posted @ 2018-12-18 16:47 猫神甜辣酱 阅读(353) 评论(0) 推荐(1) 编辑