javascript
Published on January 26, 2024By DeveloperBreeze
// Array to check
let array = [1, 2, 3, 4, 5];
// Element to check for in the array
let element = 3;
// Check if the array contains the specified element
let containsElement = array.includes(element);
// Display the result
console.log('Array Contains Element:', containsElement);
Comments
Please log in to leave a comment.