JavaScript Global Objects---Common

Source: Internet
Author: User

1. Top-level functions (global functions)

1) the IsNaN () function is used to check whether its arguments are non-numeric values. -----IsNaN (x) x is a required parameter, and if X is a special non-numeric value NaN (or can be converted to such a value), the value returned is true. Returns False if X is a different value.

2) the number () function converts the value of the object to a digit. The-----Number (object) object is a must parameter, 1) if the parameter is a Date object, numbers () returns the milliseconds from January 1, 1970 to the present. 2) the number () function returns NaN if the value of the object cannot be converted to a digit.

2. Top-level properties (global properties)

1) The NaN property is used to refer to special non-numeric values.

2) The Undefined property is used to store JavaScript undefined values. Tip: You can use the = = = operation to test whether a value is undefined because the = = operator considers the undefined value equivalent to null.

For example: Var t;

if (t===undefined) {

Alert ("T is not defined!) ");

}

JavaScript Global Objects---Common

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.