mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
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:
+1
-1
@@ -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--
|
||||
|
||||
Reference in New Issue
Block a user