Random Number III TH
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 - 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>');
}
Developer | Brooke Shepherd |
Username | tinyinkling |
Uploaded | October 22, 2022 |
Rating | 3 |
Size | 1,728 Kb |
Views | 24,288 |
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!
Name | Size |
Factorialize FCC | 3,425 Kb |
RECORD COLLECTION FCC | 1,758 Kb |
CABieberGame | 1,779 Kb |
Profile Lookup FCC JS challenge | 1,772 Kb |
Random Number Generator 20D | 1,382 Kb |
Random Number Challenge TH JS | 1,602 Kb |
Ultimate Quiz Challenge TH | 1,837 Kb |
Random Guessing Game II TH | 1,618 Kb |
WCC2 | 1,347 Kb |
Early Pattern for Function FCC | 1,463 Kb |
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!
Name | Username | Size |
Simple Login Form | JoshBlackwood | 4,418 Kb |
Sass Radar | Jlong | 6,887 Kb |
Incremental game | Eprouver | 5,868 Kb |
Font stack | Adrianjacob | 1,868 Kb |
Simple Buttons | Haydenmills | 1,750 Kb |
Learning FlexBox | Alex_rodrigues | 2,821 Kb |
Starting out with Ember.JS | Cfleschhut | 4,808 Kb |
To Do List with Delete | Mattlbrody | 2,068 Kb |
A Pen by Alex Edwards | Exards | 8,218 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!