У меня есть следующая итерация:
The content of the array respuesta is: Africa, Europa, Norteamerica
The content of the array resultado is: Incorrect, Correct, Incorrect
I created a Array to include both of them:
var contPre:Array = [ this.respuesta, this.resultado ];
for (var a:uint = 0; a < contPre[0].length; a++){
if (this.radioGroup1.selection.value == contPre[0][a] &&
contPre[1][a] == "Correcto") {
result_txt.text = "Correct";
valor = 1;
} else {
result_txt.text = "Incorrect";
valor = 0;
}
}
The first time that I've executed this I found this:
this.radioGroup1.selection.value Obtained value: Europa
contPre[0][a]: Obtained value: Europa
contPre[1][a]: Obtained value: Correcto
The sentence go out for the second option "Incorrect".
Somebody can explain why is this happening?