1. Arithmetic related
+,-,*,/,%
The subtraction and the remainder, respectively.
2.math.pow (A, B)
A's B-square
3.toFixed (a)
Rounds a number to a specified number of decimal digits
4. k++;
++k
It looks the same, but there are some tiny differences in the operation.
var k=0
Alert (k++)
Alert (++K)
Of the two equations above, the result of the first one is 0, the second one is 1.
For example: alert (++k + k++ + ++k + k);
In the formula, the first execution ++k, this time K is +1 at the same time, ++k immediately effective, so the formula becomes: Alert (1 + k++ + ++k + K); K=1
Immediately thereafter, the execution k++,k is 1, but the k++ value remains 1, so the result is: alert (1 + 1 + ++k + k); k=2
Then ++k executes, K becomes 3--alert (1+ 1 + 3 + k); k=3
Finally executes +k, becomes alert (1+1+3+3); k=3
Result is 8
5. IsNaN (v)
Whether it is a number
6.
switch (i) {
Case 0:
CASE1:
Alert ("AAA");
Break
A conditional statement that executes the corresponding statement when the value of I and the following case value are the same. Note that there is a word: break, which means that if you do not jump out, then after you execute sentence A, the program will continue to execute a+1,a+2 until a jump statement exists.
7.
var _name = "Background";
_div.style[_name] = _value;//_name refers to a variable, which refers to the string "background"
_div.style._name = _value;//_name is not a property of style, so it cannot be found
8.
ToString (2)//decimal to Binary
parseint (10, 2)//10 is represented by a binary and returns its decimal
JavaScript statement semantics Daquan (2)