Learn more about JavaScript's core ECMAScript

Source: Internet
Author: User

To get a better insight into how JavaScript works, you must first understand the core ECMAScript of JavaScript. ECMAScript variables can be divided into original values and reference values

Original type: Undefined,number,string,boolean,null.

Determining the type of a variable using the typeof operator may return "undefined", "Boolean", "string", "number", "Object", "function"

The following is a reference fragment:





6
7
8
9 Window.alert (typeof StringType);
Window.alert (typeof Numbertype);
One Window.alert (typeof Booltype);
12
13
Window.alert (typeof null);
Window.alert (typeof Math);

</script>

It's a special place. The TypeOf operator returns "Object" for a null value. This is actually an error in the initial implementation of JavaScript and is then used by ECMAScript. Now, NULL is considered a placeholder for an object, which explains the paradox, but technically it is still the original value.

Undefined type

Undefined type only one value is undefined

Related Article

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.