The seven big data types in JavaScript (types)

Source: Internet
Author: User
Tags null null

The seven big data types in JavaScript

1, undefined not defined

1 undefined

2, NULL NULL

1 NULL

3, Boolean Boolean type

1 true ; 2 false;

4, String strings

1 var myName = "Anet"; 2 var = "MyAge"; 3 // MyName, myage are all strings

5. Symbol (ES6 newly introduced data type: Prevent attribute name conflict)

1  var hello = Symbol ("Hello"); 2  var world= Symbol ("World"); 3 // Console Output 4 hello.tostring ()//Hello5 world.tostring ()//World 

6. Number

1 var myAge =; 2 // MyAge to Digital

7. Object objects

1  var obj =  new  Object (); 2  var object = {}; 3  var info = {4           "name": "MyName",5           "motto": "Hello World "6        }7//obj, object for initialization object, and info for object Format

For reference only.

The seven big data types in JavaScript (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.