Rearrange the lines to create a valid JavaScript function that generates a random integer. Make indentations where expected.
Random: getting and generating
Find the right order
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
let randomInteger = Math.floor(randomNumber);
let randomNumber = randomValue * max
return randomInteger;
function getRandomInteger(max) {
}
let randomValue = Math.random();
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.