/=
运算符将变量除以另一个数字。 myVar = myVar / 5;
将myVar
除以5
。这可以改写为: myVar /= 5;
a
, b
和c
的赋值以使用/=
运算符。 a
应该等于4
testString: 'assert(a === 4, "a
should equal 4
");'
- text: b
应该等于27
testString: 'assert(b === 27, "b
should equal 27
");'
- text: c
应该等于3
testString: 'assert(c === 3, "c
should equal 3
");'
- text: 您应该为每个变量使用/=
运算符
testString: 'assert(code.match(/\/=/g).length === 3, "You should use the /=
operator for each variable");'
- text: 不要修改行上方的代码
testString: 'assert(/var a = 48;/.test(code) && /var b = 108;/.test(code) && /var c = 33;/.test(code), "Do not modify the code above the line");'
```