2024年3月4日
摘要: 1. 多个数组长度相加 const arrays = [[1,2], [3,4], [5]]; // 示例数组 // 使用 reduce() 函数将所有数组的长度求和 const sumOfLengths = arrays.reduce((accumulator, currentArray) => 阅读全文
posted @ 2024-03-04 11:49 阿宇爱吃鱼 阅读(25) 评论(0) 推荐(0)