I have this simple code in Javascript (jQuery) and I need to acces inside a IF
statement in case one condition became TRUE
, but I always obtain TRUE
, even the condition been FALSE
, and I don't understand why. Here is the simple code:
for(var i = 0; i < vector.length; i++) {
genere = vector[i].gender;
pitch = synthProcess[i].pitch;
mood = synthProcess[i].mood;
speed = synthProcess[i].speed;
identifier = synthProcess[i].ident;
if (genere !== "auto" || pitch !== "0" || mood !== "0" || speed !== "0" || identifier !== "0"){
console.log("EXECUTING COMMAND");
}
}
What I want is ONLY when genere
is different from 'auto', pitch
different from '0' etc, then, enter inside the IF
but always is entering.
I tried with "0" (string) and 0 (int) options, but still getting the same result, in every iteration I get the Log
inside the IF