I\'m reading the second chapter of the book Eloquent JavaScript. The author states that:
Any whole number less than 2^52 (which is more than 10^
This is not a strongly typed programming language. JS has an object Number. You can even get an infinite number: document.write(Math.exp(1000));.
document.write(Number.MIN_VALUE + "
");
document.write(Number.MAX_VALUE + "
");
document.write(Number.POSITIVE_INFINITY + "
");
document.write(Number.NEGATIVE_INFINITY + "
");
alert([
Number.MAX_VALUE/(1e293),
Number.MAX_VALUE/(1e292),
Number.MAX_VALUE/(1e291),
Number.MAX_VALUE/(1e290),
].join('\n'))
Hope it's a useful answer. Thanks!
UPDATE: max int is - +/- 9007199254740992