const numbers = [1, 2, 3, 4, 5] console.log(numbers.includes(5)) // true console.log(numbers.includes(0)) // false console.log(numbers.includes(1)) // true console.log(numbers.includes(6)) // false const webTechs = [ 'HTML', 'CSS', 'JavaScript', 'React', 'Redux', 'Node', 'MongoDB' ] // List of web technologies console.log(webTechs.includes('Node')) // true console.log(webTechs.includes('C')) // false
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter