We can use JavaScript to generate random numbers, that is, numbers that are different each time the script is run. This allows us to do all sorts of fun stuff, such as:
- Show a random image or piece of text on the page
- Make a link that links to a random page
- Create games that people can play in their browser
First, let’s look at how we can create a random number in JavaScript.
[Read more…] about Fun with Random Numbers