Hello everyone, I could really use some assistance with the following code snippet:
var questions =[
['what is the capital of France?', 'paris'],
['how many hours in a day?', 24],
['how many sides does a triangle have?', 3]
]
var answers = [];
var rightAnswers = [];
var wrongAnswers = [];
for(i = 0; i<questions.length; i+=1){
answers.push(prompt(questions[i][0]).toLowerCase());
if(questions[i][1] === answers[i]){
// rightAnswers.push(questions[i][0])
console.log("Great job!");
}else{
console.log("Oops, not quite");
}
}
Having trouble comparing two elements from two arrays - any insights would be greatly appreciated! Thanks!