In JavaScript, JavaScript is a full range of operators, including arithmetic, logic, bits, assignments, and some other operators.
Calculating the assignment of logical bit operations Miscellaneous
Description Symbol Description Symbol Description Symbol description Symbol description symbol
Negative value-logical non! bitwise Inverse ~ Assignment = delete deletewww.mlybyby.com
Increment + + less than < bitwise left SHIFT << operation assignment op=typeof operator typeof
Decrement--Greater than > bitwise RIGHT SHIFT >>voidvoid
Multiplication * is less than or equal to <= unsigned right shift >>>instanceofinstanceof
Division/greater than or equal >= bitwise AND &NEWNEW
Modulo operation% equals = = Bitwise XOR or ^inin
Add + not equals! = Bitwise OR |
Subtraction-Logic and &&
Logical OR | |
condition (ternary operator)?:
Comma
strictly equal = = =
Non-Strictly equal!==
The difference between = = (equality) and = = = (strictly equal) is that the identity operator casts different types of values before comparison. For example, the identity pair string "1" and the value 1 will result in a comparison of true. Strict equality does not cast values of different types, so it considers the string "1" to be not the same as the value 1.
The basic string, numeric, and Boolean values are compared by value. If their values are the same, the comparison results are equal. objects, including array, Function, String, number, Boolean, Error, date, and RegExp objects, are compared by reference. Even if the two variables of these types have the same value, the result is true only if they are exactly the same object.
Two basic strings with the same value.
var string1 = "Hello";
var string2 = "Hello";
A two String object with the same value.
var StringObject1 = new String (string1); www.mlyrx120.com
var StringObject2 = new String (string2);
The comparison result is true.
if (string1 = = string2)
Executes some commands (which will run).
The comparison result is false.
if (StringObject1 = = StringObject2)
Execute some commands (not run).
To compare the value of a String object,
Use the toString () or ValueOf () method.
if (stringobject1.valueof () = = StringObject2)
Executes some commands (which will run).
Operators in JavaScript