js中 forEach 和 map 区别

2022-09-15 10:22:07
forEach()没有返回值,即返回值为undefined map()有返回值,可以通过return返回一个新数组