Just dipping my toes into the world of JavaScript, so please be kind with any questions that may seem "ignorant."
I've hit a snag in my current code - it feels like I'm stuck in a loop (not exactly infinite) that finally breaks after roughly 5 rounds of prompts.
var authors = [];
for(var authorIndex = 0; authorIndex < books.length; authorIndex++)
{
authors[0]=parseFloat(prompt("Who wrote War and Peace?"));
authors[1]=parseFloat(prompt("Who wrote Huckleberry Finn?"));
authors[2]=parseFloat(prompt("Who wrote The Return of the Native?"));
authors[3]=parseFloat(prompt("Who wrote A Christmas Carol?"));
authors[4]=parseFloat(prompt("Who wrote Exodus?"));
}
Not sure if I'm setting up the array incorrectly or if there's an issue with the for loop. Any guidance on how to properly populate the array would be appreciated.
Please remember that I'm still a beginner in JavaScript, so simple explanations would be incredibly helpful as I work on grasping the fundamentals. (: