c211499
1
2
3
4
5
6
7
8
9
10
11
export default function some(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); let index = -1; for (const value of values) { if (test(value, ++index, values)) { return true; } } return false; }