📅  最后修改于: 2022-03-11 15:04:00.777000             🧑  作者: 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; });