JavaScript by Radu TM • June 21, 2022
const arr = ['🍎', '🍌', '🍇', '🍈'];
// check if array doesn't include '🍐'
if (!arr.includes('🍐')) {
console.log("🍐 is not in the array");
} else {
console.log("🍐 is in the array");
}
0
23.169
JavaScript by Radu TM • June 21, 2022
const array = [1, 2, 3, 4, 5];
// checks if array doesn't include 3
if (!array.includes(3)) {
console.log("array does not include 3");
}
0
23.169