poetries / FE-Interview-Questions

关注公众号「前端进阶之旅」,一起学习。前端面试常考问题整理,按模块知识点分类 Front-end-Developer-Questions by Modules and knowledge

Home Page:https://interview.poetries.top

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

18 数组降维

sunseekers opened this issue · comments

[1, [2], 3].flatMap((v) => v + 1)
// -> [2, 3, 4]

应该是[2, "21", 4]

在浏览器打印出来的结果

@sunseekers 已修正,感谢