Array.prototype.forEach() vs Array.prototype.map()
2022年5月1日小于 1 分钟
Array.prototype.forEach()
vs Array.prototype.map()
An easy question, right?
It really depends on what you want to achieve.
In case you are not sure, read MDN about forEach()open in new window and map()open in new window