fix(curriculum): Updated the tests to accpet the answer irrespective of the order of concatenation (#54468)

This commit is contained in:
Govardhan
2024-04-23 15:00:11 +05:30
committed by GitHub
parent 427de7d95e
commit 968289c23d

View File

@@ -18,19 +18,19 @@ In your `for...of` loop, use the addition operator to concatenate the `row` valu
You should use the concatenation operator on your `result` variable.
```js
assert.match(code, /result\s*\+/);
assert.match(code, /(?:result\s*\+|\+\s*result)/);
```
You should concatenate `row` to your `result` variable.
```js
assert.match(code, /result\s*\+\s*row/);
assert.match(code, /result\s*\+\s*row|row\s*\+\s*result/);
```
You should assign the result of your concatenation back to the `result` variable.
```js
assert.match(code, /result\s*=\s*result\s*\+\s*row;?/)
assert.match(code, /result\s*=\s*(result\s*\+\s*row|row\s*\+\s*result);?/);
```
# --seed--