JS expression and operator details (bottom)

Source: Internet
Author: User

Comparison operators:

>, >=, <, <=, = =,! =, = = =,! = =,

The result of the comparison operator is a Boolean value

= = compares values only and = = = equals values and data types

1<script>2      varA = 5,b = 10;3Alert (A&GT;B)//=>false4Alert (A&GT;=B)//=>false5Alert (a>=5)//the =>true is equal to or greater than the inside as long as it is satisfied returns True6Alert (A&LT;B)//=>true7Alert (A&LT;=B)//=>true is less than or equal to the inside as long as the same is true8Alert (1==true)//=>true9Alert (0==false)//=>true Comparison of implicit conversions of typesTenAlert (0==NULL)//=>false Onealert (undefined = =NULL)//The value of =>true undefined and true is equal AAlert (nan = = Nan)//=>false Nan is not able to compare itself. -alert (undefined = = =NULL)//=>false undefined and true return false because they have different values for the same data type -</script>

JS expression and operator details (bottom)

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.