摘要: There are two solutions to this challenge, both with different ways of representing the generic. Solution 1: The first option is using TConfig which e 阅读全文
posted @ 2023-01-14 22:20 Zhentiw 阅读(15) 评论(0) 推荐(0) 编辑
摘要: See this code: const array = [ { name: 'John', }, { name: 'Steve', }, ]; const obj = array.reduce((accum, item) => { accum[item.name] = item; // Eleme 阅读全文
posted @ 2023-01-14 01:37 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑