JavaScript Kit General JavaScript Tutorials http://www.javascriptkit.com/javaindex.shtml
|
Formatting numbers for decimals and significant digits
Generating weighed random numbers in JavaScript
Using the navigator object to detect client's browser
The Math object of JavaScript
Number rounding in JavaScript
Generating a random number in JavaScript |
||||||
Strings (text)
Math
Understanding arrays and loops
|
|
||||||
Generating a random number in JavaScript A popular question on the
JK Help
Forum is how to generate a random number in JavaScript. A random
number is useful- if not required- in the creation of certain
popular JS applications, such as a dice, random image script, or
random link generator. In this JavaScript article, we'll learn how
to output a random number that falls within the range 1 to x, where
x is any integer >1.
|