Random Number III TH

Size
1,728 Kb
Views
24,288

How do I make an random number iii th?

What is a random number iii th? How do you make a random number iii th? This script and codes were developed by Brooke Shepherd on 22 October 2022, Saturday.

Random Number III TH Previews

Random Number III TH - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Random Number III TH</title>
</head>
<body> <html lang="en">
<head> <meta charset="utf-8"> <link rel="stylesheet" href="css/main.css"> <title>Random Number III</title>
</head>
<body> <div class="container"> <h1>Random Number III</h1> <script src="script.js"></script> </div>
</body>
</html> <script src="js/index.js"></script>
</body>
</html>

Random Number III TH - Script Codes JS Codes

/*
the Random Number Guessing Game
Generates a number between 1 & 6
and gives a player two attempts to guess
the number.
*/
var correctGuess = false;
var randomNumber = Math.floor(Math.random() * 6) + 1;
var guess = prompt('I am thinking of a number between 1 and 6. What is it?');
if (parseInt(guess) === randomNumber) { correctGuess = true;
} else if (parseInt(guess) < randomNumber) {}
var guessMore = prompt('Try again. The number I am thinking of is more than ' + guess);
if (parseInt(guessMore) === randomNumber) { correctGuess = true;
} else if (parseInt(guess) > randomNumber) { var guessLess = prompt('Try again. The number I am thinking of is less than ' + guess);
}
if (correctGuess) { document.write('<p>You guessed the number!</p>');
} else { document.write('<p>Sorry. The number was ' + randomNumber + '.</p>');
}
Random Number III TH - Script Codes
Random Number III TH - Script Codes
Home Page Home
Developer Brooke Shepherd
Username tinyinkling
Uploaded October 22, 2022
Rating 3
Size 1,728 Kb
Views 24,288
Do you need developer help for Random Number III TH?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Brooke Shepherd (tinyinkling) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!