We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This was a really great tutorial series - easy to follow and quick to build!
I think I have found a small issue with the following code:
Build-A-Quiz-App-With-HTML-CSS-and-JavaScript/12. Create a Spinning Loader/game.js
Line 30 in 91c5022
Math.random() returns a value in the range [0,1), i.e. it will never return 1 - see source.
Math.random()
So it looks like the code will only return values of 1, 2 or 3. Never 4.
I think a simple fix is the following: formattedQuestion.answer = Math.floor(Math.random() * 4) + 1;
formattedQuestion.answer = Math.floor(Math.random() * 4) + 1;
The text was updated successfully, but these errors were encountered:
jamesqquick#7 ISSUE RESOLVED
bc235d4
No branches or pull requests
This was a really great tutorial series - easy to follow and quick to build!
I think I have found a small issue with the following code:
Build-A-Quiz-App-With-HTML-CSS-and-JavaScript/12. Create a Spinning Loader/game.js
Line 30 in 91c5022
Math.random()
returns a value in the range [0,1), i.e. it will never return 1 - see source.So it looks like the code will only return values of 1, 2 or 3. Never 4.
I think a simple fix is the following:
formattedQuestion.answer = Math.floor(Math.random() * 4) + 1;
The text was updated successfully, but these errors were encountered: