feat: edit 2nd test description for clarity (#38661)

current description logically fits, yet fails this solution: myVar = ++myVar;
This commit is contained in:
Michael Schneider
2020-05-02 17:27:52 +04:00
committed by GitHub
parent fd85f57376
commit 1f2b66a432

View File

@ -28,7 +28,7 @@ Change the code to use the <code>++</code> operator on <code>myVar</code>.
tests:
- text: <code>myVar</code> should equal <code>88</code>.
testString: assert(myVar === 88);
- text: <code>myVar = myVar + 1;</code> should be changed.
- text: You should not use the assignment operator.
testString: assert(/var\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code));
- text: You should use the <code>++</code> operator.
testString: assert(/[+]{2}\s*myVar|myVar\s*[+]{2}/.test(code));