Array.prototype.includesbeginnerconst fruits = ['apple', 'banana', 'cherry']
fruits.includes('banana') // β true
fruits.includes('grape') // β falseUse includes() to check whether a specific value exists in an array.
Array.prototype.includes(value, fromIndex?) returns true if the array contains value, using the SameValueZero algorithm (like === but also handles NaN).
Challenge: Implement hasValue(arr, val) that returns arr.includes(val).
hasValue([1, 2, 3], 2) // β true
hasValue([1, 2, 3], 5) // β false