JS Number Object

Source: Internet
Author: User
Numeric properties
  • Max_value
  • Min_value
  • Negative_infinity
  • Positive_infinity
  • NaN
  • Prototype
  • Constructor
Digital method
  • Toexponential ()
  • ToFixed ()
  • Toprecision ()
  • ToString ()
  • ValueOf ()
Infinity (Infinity)

When the result of a numeric operation exceeds the upper limit (overflow) of the number that JavaScript can represent, the result is a special infinity (infinity) value, expressed as infinity in JavaScript. Similarly, when the value of a negative number exceeds the range of negative numbers that JavaScript can represent, the result is negative infinity, represented by-infinity in JavaScript. The behavior characteristics of infinite values are consistent with what we expect: based on their addition, subtraction, multiplication, and divide operations, or infinity (and, of course, their positive and negative numbers).

NaN-Non-numeric value

The NaN property is a special value that represents a non-numeric value. This property is used to indicate that a value is not a number. You can set the number object to this value to indicate that it is not a numeric value.

You can use the IsNaN () global function to determine whether a value is a NaN value.

JS Number Object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.