PHP
·
发表于 5年以前
·
阅读量:7711
function dropElements(arr, fn) {
while (arr.length && !fn(arr[0])) arr = arr.slice(1);
return arr;
}