How JavaScript uses some ()
This article mainly introduces how JavaScript uses some (), which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.
Some ()
The some method is used to traverse the array, triggering a callback function after each element, and returns true as long as one satisfies the condition. Otherwise, it returns false, similar to | | compare, for example:
Let arr5 = [{result: true}, {result: false}]; let newArr5 = arr5.some ((e, I) = > e.result); / / trueconsole.log (newArr5) as long as one is true / / true Thank you for reading this article carefully. I hope the article "how to use some () for JavaScript" shared by the editor will be helpful to you. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!