JavaScript Numbers FAQ
JavaScript FAQ
| JavaScript Numbers FAQ
What number formats can I use in JavaScript code?
How do I handle mathematical constants in JavaScript?
Is there a way to use octal and hexadecimal values in JavaScript?
How do I convert numbers to strings?
How do I convert strings to numbers?
Can I convert a number to string with exactly
n
decimal places?
How do I convert a number to a different base?
Is there a way to test whether a particular variable holds a number or a string?
What arithmetic operations are supported in JavaScript?
What mathematical functions are supported in JavaScript?
How do I plot a function graph using JavaScript?
How do I generate random numbers?
How can I round a number to
n
decimal places?
Can I avoid "inaccurate" results in computations, e.g. 0.362*100=36.199999999999996?
How do I test if a given number
n
is prime?
See also:
Can I display mathematical symbols as part of JavaScript output?
Doing Math with JavaScript
Copyright
© 1999-2011,
JavaScripter.net
.