Trying to make a small trivial in JS, I can not solve the error of the if or the arrays. In this case the correct answer would be b, which implies that typing something else is false. What should I modify in this case?
var preguntas= new Array();
var respuesta=new Array();
preguntas[0]=new Array();
preguntas[0][0]= prompt("¿Cuánto mide el Everest? \n a: 8.912 m \n b:8.848 m \n c:8.800 m");
preguntas[0][1]="8.912";
preguntas[0][2]="8.848";
preguntas[0][3]="8.800";
respuesta[2]="b";
if(respuesta[2]=="b") {
alert("Acierto");
}else {
alert("Fallo");
}