Closed matiamin closed 9 years ago
Hey Mati,
What exactly do you mean by not executing? Is the code in your event listener not running at all? Try moving your event.preventDefault()
to the top of your event listener.
Hey Mati,
just reiterating Adrian's question... what do you mean it's not executing? (in general, the loop part of the code looks correct"). Have you tried using console.log
statements to see what's going on?
Instead of going through each array value of first object, it is looping through the first array value of all three objects. Not sure if I'm asking this correctly.
Are you getting any errors in the JS console when you run your code?
(If so, can you paste them here?)
Trivia project.
I'm trying to loop through array values inside objects in an array, but code isn't executing. See below the line of code I tried. Goal is to loop through each array value because I've set multiple answers for each question.
https://github.com/matiamin/mati_Project1/blob/mati_solution/script.js#L27