Tell us what’s happening:
I already pass the other test except for tests 11 and 12.I already check the spelling and capitalization. There must be something I’m not seeing here
Your code so far
const questions = [
{
category: "hero",
question: "what is your favorate hero?",
choices: [`sven`, `drow`, `invoker`],
answer: `sven`,
},
{
category: "role",
question: "Whick role suit you best?",
choices: [`carry`, `midlane`, `support`],
answer: `support`,
},
{
category: "lane",
question: "Which part of the map will you lane?",
choices: [`toplane`, `mid`, `botlane`],
answer: `botlane`,
},
{
category: "pick",
question: "What is your usual hero pick as a support?",
choices: [`chen`, `crystalmaiden`, `bane`],
answer: `crystalmaiden`,
},
{
category: "time",
question: "What time will the wisdom appears?",
choices: [`5:00`, `6:00`, `7:00`],
answer: `7:00`,
},
]
function getRandomQuestion(questions) {
let randomQ = questions[Math.floor(Math.random() * questions.length)];
return randomQ;
};
function getRandomComputerChoice(choices) {
let randomC = choices[Math.floor(Math.random() * choices.length)];
return randomC;
};
function getResults(questions, computersChoice) {
if (computersChoice === questions) {
return "The computer's choice is correct!";
}else{
return `The computer's choice is wrong. The correct answer is: ${questions.answer}`;
}
}
console.log(getResults())
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36 Edg/144.0.0.0
Challenge Information:
Build a Quiz Game - Build a Quiz Game