number (JavaScript 1.1)

Lets you work with numeric values. The Number object is an object wrapper for primitive numeric values.

Properties & Events

KeyDescriptionAvailability
constructorSpecifies the function that creates the Number prototype.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
max_value The maximum numeric value representable in JavaScript.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
min_value The smallest positive numeric value representable in JavaScript.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
nanA value representing Not-A-Number.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
negative_infinitySpecial value representing negative infinity; returned on overflow.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
positive_infinitySpecial value representing infinity; returned on overflow.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
prototypeReference to the Number prototype object.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0

Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 4.0

Examples having uses of: 'number'

1 votes
8k views

JavaScript Comparison Operator ==

JavaScript "==" is equal to operator.
1 votes
7k views

JavaScript For

Javascripts loops are similar to other programming languages. Loops allows us to execute a block of statements to the specified number of times.
0 votes
1k views

JavaScript Comparison Operator ===

JavaScript "===" is exactly equal to (value and type) operator.
0 votes
9k views

JavaScript switch statement with number

The switch statement is used to select one statement from the many blocks. This is used on place of nested if…else. If there are number of if..else statements then we should use switch.
0 votes
1k views

JavaScript Comparison Operator !=

JavaScript "==" is not equal to operator.
0 votes
1k views

JavaScript Comparison Operator >

JavaScript > is greater then operator.
0 votes
1k views

JavaScript Comparison Operator <

JavaScript < is less then operator.
0 votes
1k views

JavaScript Comparison Operator >=

JavaScript > is greater or equal to operator.
0 votes
1k views

JavaScript Comparison Operator <=

JavaScript > is less or equal to operator.
0 votes
1k views

JavaScript Logical Operator && (and)

The && (and operator) logical operator are used to determine the logic between variables or values.
0 votes
1k views

JavaScript Logical Operator || (or)

The || (or operator) logical operator are used to determine the logic between variables or values.
0 votes
1k views

JavaScript Logical Operator ! (not)

The ! (not operator) logical operator are used to determine the logic between variables or values.