Array.prototype.somebeginnerconst words = ['cat', 'dog', 'elephant']
words.some(w => w.length > 5) // β true ('elephant')Use some() to check whether any string in an array meets a length or pattern condition.
some() works on arrays of any type. You can inspect string properties like .length inside the predicate.
Challenge: Implement hasLong(strs, minLen) that returns true if any string has length >= minLen.
hasLong(['hi', 'hello', 'hey'], 5) // β true
hasLong(['hi', 'hey'], 5) // β false