JS中some()方法

200 阅读1分钟

some()方法接收一个回调函数,只要其中有一个元素返回的是true,总体返回的是true

return会终止some循环,return不会终止forEach循环