04-04-2023, 07:14 AM
// Check if an array contains a string
const colors = ['red', 'green', 'blue'];
const result = colors.includes('red');
document.write(result);
const colors = ['red', 'green', 'blue'];
const result = colors.includes('red');
document.write(result);
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos