mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): Regex should only allow == or === in equality check (#62134)
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ Above your `currentContent = newContent;` line, add an `if` statement to check i
|
||||
You should add an `if` statement to check if `currentContent` is equal to `newContent`. If so, return.
|
||||
|
||||
```js
|
||||
assert.match(code, /if\s*\(\s*currentContent\s*=={2,3}\s*newContent\s*\)\s*(?:{\s*return;?\s*}|return\s*;?)/);
|
||||
assert.match(code, /if\s*\(\s*currentContent\s*={2,3}\s*newContent\s*\)\s*(?:{\s*return;?\s*}|return\s*;?)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user