Check If Some Items Pass a Condition - JavaScript Array Some (In 2 Mins)

preview_player
Показать описание
The array "some" method in JavaScript lets you test whether or not at least 1 element in your array passes a specified condition. Perfect for knowing when to display something like an error message if "some" operations have failed on your web app 😎

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript
Рекомендации по теме
Комментарии
Автор

Love all these short succinct videos you are doing 💯😃👍

pjc
Автор

Anyone else think that array.any( ) would've made a lot more sense? 😅

<EDIT>
Ok, just now realized that this comment might be a bit misleading.

Obviously, there is no array.any() method in Javascript.

WHAT I MEANT was: it would've made much more sense if the ECMAScript specified Array.Any() instead of Array.Some() for the intended purposes highlighted in Dom's video.

Sorry for the confusion!
</EDIT>

christian-schubert
welcome to shbcf.ru