How to create a JavaScript random number generator

preview_player
Показать описание
Generating random numbers in JavaScript is easy once you understand how the built-in function to do this works but a lot of developers tend to write repetitive code rather than creating their own random number function which can be re-used.

So in this video I am going to show you how to write your own JavaScript random number generator function which will generate random numbers in a range that you specify.

This video will give you the code you need to generate random numbers in JavaScript but we'll also look at a way of creating a re-usable function which can be used in any project or bit of code to create a list of random numbers within any number range.
Рекомендации по теме
Комментарии
Автор

Hi James. Just an update. After failing all your JS exercises, i worked through this tutorial. After that, i coded a random number game with one player against the computer, with a score board as well. Guess what, the game is working..no jokes😂😂. I still cannot believe what i coded. Thank you for your tutorials which i failed. I learned a lot. Waiting for your next JS upload..best regards.👍🙏🙏👍🏆😊

oukiebotha