Basic JavaScript Learning (iii)

Source: Internet
Author: User
Tags bitwise bitwise operators

The JavaScript operator

Learning Essentials:

An expression

Operators: Unary operators, arithmetic operators, relational operators, logical operators, * bitwise operators, assignment operators

I. Expressions

Expressions have constant expressions, variable expressions, and compound expressions.

Second, arithmetic operators

Unary:+ (plus),-(minus sign), + + 、——

Binary: *,/,%,+,-

Third, relational operators

= =, = = = PS: The equivalent operator is more stringent than the equality operator, and the equivalent operator returns true only if the two operand types are the same and the values are the same.

<, <=, >, >=

Instanceof operator, in operator: In the case of an object, the in operator compares the property name of the object;

For arrays, the in operator compares the subscript of an array.

Four, logical operators

&&, | |,!

V. Bitwise OPERATORS

&, |, ~ (non) (This operation uses the original code, complement, negation, etc.), ^ (XOR)

>>, <<,

Vi. Other operators

Conditional operator:? :

String operator: +

Other operators: New, void, typeof,. (object property access), [] (array element access), delete, this

Vii. Precedence of Operators

  

  

Basic JavaScript Learning (iii)

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.