// Example 2: Searching from a specific index constfruits = ['apple', 'banana', 'cherry', 'date']; console.log(includes(fruits, 'banana', 2)); // Output: false
Example
// Example 3: Using with an empty array constemptyArray: number[] = []; console.log(includes(emptyArray, 1)); // Output: false
Checks if a value is present in an array.