JavaScript data types

Source: Internet
Author: User

<!    DOCTYPE html>//return NULL if object does not exist        //variable not assigned value is undefined        varTest1 = "ABCdef"; varTest2 = 123; varTest3 =true; varTest4 = {}; varTEST5 = []; varTest6; varTest7 = {"ABCdef": 123}; varTest8 = ["Abac", 123]; functionTest9 () {return"AVC"}; varTest10 =NULL; Console.log (typeoftest10)//nan is a numeric value that cannot be represented, cannot compare itself to Nan! = Nan, and nan is not equal to anything        //Judging Nan, any value that is not a number passed to isNaN returns the result that is true        varMyNum; if(IsNaN (MyNum)) {MyNum= 0;        } alert (MyNum); //infinity refers to a value that exceeds the upper or lower limit of the data        if(99 = = "99") {Console.log ("A number equals A string"); } Else{Console.log ("No" a number equals a strings "); }    </script>

JavaScript 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.