Array.prototype.some() - Returns true if at least one element in this array satisfies the provided testing function.
Array.prototype.every() - Returns true if every element in this array satisfies the testing function.
Array.prototype.find() - Returns the found element in the array, if some element in the array satisfies the testing function, or undefined if not found.
Array.prototype.findIndex() - Returns the found index in the array, if an element in the array satisfies the testing function, or -1 if not found.
Some data we can work with:
Is at least one person 19 or older in the people array?
Code
Output
Is everyone 19 or older?
Code
Output
Find the comment with the ID of 823423 in the comments array
Code
Output
Find the index of the comment with ID of 823423
Code
Output
Delete the comment with the ID of 823423
Code
Output