mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-09 21:01:20 -04:00
fix(curriculum): replace any character with literal dot in regex (#53873)
This commit is contained in:
@@ -42,7 +42,7 @@ assert.match(code, /userData\?\.songs\.sort\(\s*\(\s*\)\s*=>\s*/)
|
||||
The callback of your `sort()` method should return `Math.random() - 0.5`.
|
||||
|
||||
```js
|
||||
assert.match(code, /userData\?.songs\.sort\s*\(\s*\(\s*\)\s*=>(\s*{\s*return\s+Math\.random\(\s*\)\s*-\s*0\.5\s*;?\s*}\s*)|(\s*Math\.random\(\s*\)\s*-\s*0\.5\s*)\s*\)\s*;?/);
|
||||
assert.match(code, /userData\?\.songs\.sort\s*\(\s*\(\s*\)\s*=>(\s*{\s*return\s+Math\.random\(\s*\)\s*-\s*0\.5\s*;?\s*}\s*)|(\s*Math\.random\(\s*\)\s*-\s*0\.5\s*)\s*\)\s*;?/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -14,7 +14,7 @@ The last step for the `sortSongs` function is to return `userData?.songs`.
|
||||
You should return `userData?.songs` at the end of the `sortSongs` function.
|
||||
|
||||
```js
|
||||
assert.match(code, /return\s+userData\?.songs;?/);
|
||||
assert.match(code, /return\s+userData\?\.songs\s*;?/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user