📅  最后修改于: 2022-03-11 15:03:05.403000             🧑  作者: Mango
const dropElements = (arr, func) => {
const indexes = arr.findIndex(func);
return indexes >= 0 ? arr.slice(indexes) : []
}
dropElements([1, 2, 3], function(n) {return n < 3; });