Currently, I am working on a project to create a Skate Dice program that will select random numbers and display the results simultaneously. Unfortunately, I have encountered an issue where the randomly generated number is not being shown; instead, it displays as undefined
. If you want to view an example of this problem, check out this CodePen demonstration
function rolldie1() {
Math.random();
}
if (rolldie1 < 0.99) {
var answer1 = "Ollie";
}
function show1() {
alert (answer1);
}