fix(curriculum): All tests for the for...of loop in the Dice game should allow campers to use let or const (#54066)

This commit is contained in:
Prajvala R C
2024-03-13 08:36:33 +01:00
committed by GitHub
parent 4c84362b4a
commit d33e89acb9
@@ -14,7 +14,7 @@ To count the occurrences for each number, use a `for...of` loop to iterate throu
You should use a `for...of` loop to iterate through the `arr` array.
```js
assert.match(code, /const\s+detectFullHouse\s*=\s*(\(\s*arr\s*\)|arr)\s*=>\s*{.*\s*for\s*\(\s*const\s+num\s+of\s+arr\s*\)\s*{\s*.*}/s);
assert.match(code, /const\s+detectFullHouse\s*=\s*(\(\s*arr\s*\)|arr)\s*=>\s*{.*\s*for\s*\(\s*(const|let|var)\s+num\s+of\s+arr\s*\)\s*{\s*.*}/s);
```
# --seed--