Если использовать цикл:
let names = ["Web", "DEV", "telegram"];
for (let i = 0, totalNames = names.length; i < totalNames; i = i + 1) {
if (names[i] === "DEV") {
console.log("%c found DEV", "color:red");
}
}
Используя some:
let names = ["Web", "DEV", "telegram"];
let isRahulPresent = names.some(name => name === "DEV");
if (isRahulPresent) {
console.log("%c found DEV", "color:red");
}
%c в выражении будет применять стиль к тексту консоли.WebDEV #советы
