JSFiddle - React, Tailwind, and code Playground
by ChrisStanyon
JavaScript
const highNum = prompt("Choose a high Number");
const lowNum = prompt("Choose a low Number");
if (typeof highNum && lowNum === 'number') {
const userNum = Math.floor(Math.random() * parseInt(highNum)) + 1;
console.log(`${userNum} is a Random Number between ${lowNum} and ${highNum}!!!`);
} else {
console.log("You need to provide a number, Try again please!");
}