摘要: /** * 实现数组flat方法 * 可通过递归方式进行将数组拍平,实现flat, 默认depth为1 */ function flat (array, depth = 1) { const result = []; for (const item of array) { // r如果item为ar 阅读全文