*=
操作符是让变量与一个数相乘并赋值。
myVar = myVar * 5;
变量myVar
等于自身与数值5
相乘的值。也可以写作这样的形式:
myVar *= 5;
*=
操作符实现同样的效果。
a
应该等于25
。
testString: assert(a === 25);
- text: b
应该等于36
。
testString: assert(b === 36);
- text: c
应该等于46
。
testString: assert(c === 46);
- text: 应该对每个变量使用*=
操作符。
testString: assert(code.match(/\*=/g).length === 3);
- text: 不要修改注释上面的代码。
testString: assert(/var a = 5;/.test(code) && /var b = 12;/.test(code) && /var c = 4\.6;/.test(code));
```