Undefined of JavaScript data types

Source: Internet
Author: User

The data types in the Javascrip are divided into the original data type (primitive type) and the object data type (objects type).

Raw data type

The original data types are: Number, string, Boolean, null, undefined.

Object data type

An object data type is an object type in which data types in JavaScript, except numbers, strings, and Boolean values, are objects.

A brief introduction to the data types in JavaScript can be found in: http://www.easy-dis.net/?p=161, which is not described in detail here. Here is the main talk about undefined.

Undefined is a data type with only one value, which is ' undefined ', and the value of this variable is undefined when declaring a variable with VAR but not initializing it. Such as

var num;alert (num);

This will output undefined because the variable that is declared with Var is not initialized, and the result outputs a undefined value.

Undefined of JavaScript data types

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.