Skip to content

变异方法意味着会改变原数组,而非变异方法则只会返回一个新数组

变异方法比较多,我们只要把几个非变异方法记住即可。

非变异方法:

  • filter()
  • concat()
  • slice()
  • map()