when use JS .includes() vs .some()? [closed]

some takes in a callback function where you can write your own logic to determine if an array contains some element which matches the conditions you wrote.

includes does a generic equalTo comparison on every element and will return true if at least one element in the array is equal to the value to find.

Leave a Comment