Looks like you might be missing something in the line where you determine the optionIndex
. Try logging optionIndex
to the console, and see if it is a valid index.
no im new to this part of code academy
can only embed one imahge
dm?
i need help
have three screenshots
Rather than screenshots of your code, copy it, and paste it into a post following these guidelines.
The line I mentioned above though:
const optionIndex = Math.floor(Math.random()
animalInfo.facts.length);
is definitely a problem. That line throws an error:
const optionIndex = Math.floor(Math.random()
^
SyntaxError: missing ) after argument list
There may be other issues as well. It would be helpful if you could describe what you are expecting to happen versus what actually happens. Try fixing the line I’ve identified, and see what happens from there.
that was it
Im new to the now real world of online education
sorry for the breaches in decorum
No worries. Happy coding!