One, operator
1. Operator Classification:
by function: arithmetic operator: + 、-、 *,/,%, + + 、--
Example: 12+12-11+5*6+20/5+5%2+ (5%-2) + ( -5++2) + (a++) + (++a) + (--a) + (a--). Note that the return result value in the modulo operator is independent of the second argument and the positive and negative correlation of the first parameter.
Assignment operator: =
String operators: +, concatenation operators
Logical operator:&& (one non-wholly non), | | (A true whole is true)
Relational operators:>, >=, <, <=, = =,! =, = = =,!==
Bitwise operators:
Other operators: conditional operator Condition?value1:value2.
Comma operator, true:value1,value2,
Delete Operator: delete operator to remove a variable that is not defined with Var. The delete operator can delete an object's properties, delete an object that is not defined with VAR, delete an array element after the operation has a constant length, and a value of undefined;
In operator: Determines whether an attribute belongs to an object or an array of element attributes, and returns a Boolean type
Instanceof Operator: Determines whether an instance object belongs to an object type, returns a Boolean type
New operator: Creates a JavaScript-custom or built-in object.
This operator: Represents an Entity object, etc.
typeof operator: Returns the type information of the object to be viewed as a string
void operator: An operator that does not return any information.
. Operator: object property access operation
[] Operator: reads or sets element properties.
By number: unary operator: + (positive),-(negative)
Binary operators: + 、-、 *, =,%, etc.
Ternary operator:? :
2, operand type: JS weak type, general calculation rules from left to right, the operation of the two-dollar operator when the previous operand type is a base type operation.
JavaScript Basics-Operators and expressions