手K 练习

120 阅读1分钟

一、扁平化数组

function flat(arr){  while(arr.some(item=>Array.isArray(item))){    arr = [].concat(...arr)  }  return arr}

二、简单实现 防抖 、节流