Without floor the dice value is a decimal.
Acceptance criteria
- 1.#out should show valid roll.
Without floor the dice value is a decimal.
const roll = Math.random() * 6 + 1; document.querySelector('#out').textContent = Number.isInteger(roll) && roll >= 1 && roll <= 6 ? "valid roll" : "not a whole number";
Output ready when you are
Press Run to render your code, or Submit to validate your solution.