(4) JavaScript Study Notes-data type and value (continued)

Source: Internet
Author: User
1. null1. it is generally regarded as a special value of the object type, that is, the value without an object; 2. when used in a Boolean environment, convert to false, the numeric environment to 0, and the string environment to null. 2. undefined1. use an undeclared variable or a variable without a value, or... syntaxHighlighter. all ();

I. null

1. It is generally regarded as a special value of the object type, that is, the value of "no object;

2. if it is used in a Boolean environment, it is converted to false, the numeric environment is 0, and the string environment is "null ";

Ii. undefined

1. This value is returned when an undeclared variable, a variable without a value assignment, or an object attribute that does not exist;

2. Although it is different from the null value, the = Operator treats the two as equal; www.2cto.com

3. It is used in a Boolean environment. It is converted to false, the numeric environment is NaN, and the string environment is "undefined ";

Iii. Summary of type conversion

 
By: dxh_0829


 

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.