I have an array as follows:
var temp = ["5","5","5","5"];
And here is the If condition:
if((temp[0] == temp[1]) && (temp[1] == temp[2]) && (temp[2] == temp[3])){
square++;
}
Why is my last condition temp[2] == temp[3] returning false? When I check the values of both these indexes in the console, they show equal, but the condition itself returns false.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire