JavaScript (i) Basic data types

Source: Internet
Author: User

The code is written through the ExtJS framework and can be copied directly into a function in JS, which is called via HTML

Ext.onready (function(){    //JavaScript data type: Number,string,boolean,object,undefined,function        // Number    varNUM1 = 10; varnum2 =. 6;//0.6    varNUM3 = 070;//octal    varNUM4 = 1/0; Positive InfinityvarNUM5 = Window.parseint ("10data");//are characters that show NaN (you and yourself are not equal)    Debugger; //Object    vardata =NewDate (); vararr =NewArray (); varobj = {name: "Shang Academy", Age:10}; varm = Alert (Obj.hasownproperty ("name"));//returns True    varresult =Obj.tosource (); Alert (typeofresult);//execution stops here, String    Debugger; //Undefined declared but not assigned, equivalent to null    varA; alert (a);//UndefinedAlert (a==NULL);//= = Judgment value, = = = Type and value, TrueAlerttypeof NULL);//represents a reference to an empty object, object        //Function    functionFun () {Console.info ("Fun"); } alert (typeofFun);//Function});

JavaScript (i) Basic data types

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.