In the previous article, we explained the unary operators, bitwise operators, and boolean operators in javascript operators. Today we will continue to explain the remaining operators, including multiplication operators, addition operators, equality operators, condition operators, value assignment operators, and comma operators. Let's take a closer look at these operators to help improve your understanding of javascript.
I. Multiplication Operators
1. Multiplication :*
Special rules for multiplication operators:
If the operands are all numeric values, they are calculated by regular multiplication. If the product exceeds the range indicated by the ECMAscript value, infinity or-infinity is returned.
If one of the operands is NaN, the returned result is NaN.
If infinity is multiplied by 0, NaN is returned.
If infinity is multiplied by a non-zero number, infinity or-infinity is returned.
Returns infinity if infinity is multiplied by infinity.
If one of the operands is not a value, the backend will call number () to convert it to a value, and then apply the preceding rule.
The Code is as follows: