Back to lesson
1. How do we generate a random number between 1 and 10?
document.write(Math.floor(Math.random() * 10) + 1);
document.write(Math.random() * 10) ;
About the same as other languages
3. How do we calculate the correct answer?
var correctAnswer = number1 + number2;
correctAnswer = number1 + number2;
Back to the top
© 2017 GoSkills Ltd.
Skills for career advancement