Operators for 3.js

Source: Internet
Author: User

3.js operator 1. Arithmetic operator 1.1 Description: JS arithmetic operators and most languages of the sum of the same operator, see example; 3 + 2//plus 3-2//minus 3 * 2//Multiply 3/2//except points[1].x-points[0].x//Access Previous Section object The value of: 1-0 =>1 "3" + "2"//+ can complete the addition operation or string connection/Same as Java function in the shorthand form of the arithmetic operator in 1.2js var count = 0; Define a variable count + +; Self-increment 1count-; Self minus 1count + = 2; Increment 2: The same as "Count = Count + 2" as Count *= 3; Increment 3: As with "Count = Count * 3", Count//=>6: The variable name itself is also an expression (not very clear why 6) 1.3 equals to the unequal operation var x = 2, y = 3; The equal sign here is the meaning of the assignment, as in other programming languages x = = y; =>false; unequal x! = y; =>true; unequal x < y; True;x <= y; true; less than or equal to X > y; false; greater than x >= y; False, greater than or equal to "two" = = "three"//false; two strings unequal "two" > "three"//true; " TW "The index in the alphabet is greater than" th "false = = (x > Y)//true;false and False equals 2. Logical operator 2.1 logical operator is a combination of Boolean values or negation (x = = 2) && (y = = 3)//true; two The comparison is true,&& "with" (X > 3) | | (Y < 3)//false; two comparisons not all true,| | means "or"! (x = = y)//true;! Seek counter

Operators for 3.js

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.