Stuck with Assignment 1

I spent the whole day doing this assignment , but I have issues with this. It prints the result as expected, but after giving the status as "failed or passed ",it goes back to the first question. and its never ending. can someone please help me with this?
here is my link.
replit link removed

I can’t see the link you posted. can you post it again?

replit solution link removed

Thank you so much. Figured out the mistake I did, but it did not pass the test in github. can you please help me with this.

Have you checked out the videos detailing each part of the assignment posted by Terrance on slack?
I am finding them helpful.
My project1 is pretty much done but I still have some work to do right now, so look at those videos if you haven’t already and if you still can’t figure it out I will try and help a little later.

I watch the video and looked at yours but still having some issues with mine.
const input = require(‘readline-sync’);

// TODO 2: modify your quiz app to ask 5 questions //

// TODO 1.1a: Define candidateName //

let candidateName = “”;

// TODO 1.2a: Define question, correctAnswer, and candidateAnswer //

let question = 1;

let correctAnswer = 0;

let candidateAnswer = “”;

let questions = ["Who was the first American woman in space? ", "True or false: 5000 meters == 5 kilometers? ", "(5+3)/2*10=? ", "Given the array [8, ‘Orbit’, ‘Trajectory’, 45], what entry is at index 2? ", "What is the minimum crew size of the ISS? "];

let correctAnswers = [“Sally Ride”, “True”, 40, “Trajectory”, 3];

let candidateAnswers = [];

function askForName() {

// TODO 1.1b: Ask for candidate’s name //

candidateName = input.question("What is your name: ")


function askQuestion() {

// TODO 1.2b: Ask candidate the question and assign the response as candidateAnswer //

for (let i = 0; i < questions.length; i++) {

candidateAnswers[i] = input.question(${question + i} ${questions[i]} \nYour answer: );

console.log(Correct Answer: ${correctAnswers[i]} \n)

if (candidateAnswers[i].toLowerCase() === correctAnswers[i].toLowerCase()){

correctAnswer = 0;




Error code:
if (candidateAnswers[i].toLowerCase() === correctAnswers[i].toLowerCase()){

TypeError: correctAnswers[i].toLowerCase is not a function

Maybe missing a ; here :

console.log(Correct Answer: ${correctAnswers[i]} \n )

I am getting the exact error message at the exact place. Were you able to figure out how to fix it? I have been going over and over the code, looking for open brackets and making all kinds of tweaks, but I have not gotten it to work, after being very close to completion yesterday.

Here is what I have that worked
if(candidateAnswers[i].toLowerCase() === correctAnswers[i].toLowerCase()) {

Thanks for replying. That is exactly what I have, and I am still getting the error message that .toLowerCase() is not a function. Not sure what else I can do right now.

If you want to share your link. I will take a look at it

Here it is:

replit link removed

I have gone over and over and over it. Cannot figure out the problem. When I have compared to other people’s code, I do not see a difference. And yet…
Thanks in advance for having a look at it.

Are you on the slack or discord for this course?