📜  freecodecamp 放弃它 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:00.777000             🧑  作者: Mango

代码示例1
const dropElements = (arr, func) => {
  const indexes = arr.findIndex(func);
  return indexes >= 0 ? arr.slice(indexes) : []
}

dropElements([1, 2, 3], function(n) {return n < 3; });