赋值运算符和关系运算符
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title></title> 6 <script type="text/javascript"> 7 /* 8 * = 9 * 可以将符号右侧的值赋值给符号左侧的变量 10 * += 11 * a += 5 等价于 a = a + 5 12 * -= 13 * a -= 5 等价于 a = a - 5 14 * *= 15 * a *= 5 等价于 a = a * 5 16 * /= 17 * a /= 5 等价于 a = a / 5 18 * %= 19 * a %= 5 等价于 a = a % 5 20 * 21 */ 22 var a = 10; 23 24 //a = a + 5; 25 //a += 5; 26 27 //a -= 5; 28 29 //a *= 5; 30 31 // a = a%3; 32 a %= 3; 33 34 console.log("a = "+a); 35 36 </script> 37 </head> 38 <body> 39 </body> 40 </html> 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title><