/** * 提取若干数组中指定字段组合成一个新数组 */ function extractProps(arr, prop) { return arr.map((item) => item[prop]); }