So i was making some console stuff for my things and i wanted to make some kind of"detection" of command, like if what i input into the thing is command then make it change color of text to white
it did work if i use variable like this
var commands = ['command1'];
or
var commands = 'command1';
but i did not with variable used like in code down there
code:
var commands = ['command1', 'commands2']
window.setInterval(function() {
if (input.innerHTML.toLowerCase() == !commands) {
console.log("test")
}
}, 32);
innerHTMLisfalsesince!an array is always false.