mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum) - more commas in destructuring (#48176)
fix - support extra commas
This commit is contained in:
parent
874651413a
commit
fd34202188
@ -53,7 +53,7 @@ You should use destructuring to create the `lowToday` variable.
|
||||
```js
|
||||
assert(
|
||||
code.match(
|
||||
/(var|const|let)\s*{\s*today\s*:\s*{\s*(low\s*:\s*lowToday[^}]*|[^,]*,\s*low\s*:\s*lowToday\s*)}\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g
|
||||
/(var|const|let)\s*{\s*today\s*:\s*{\s*(low\s*:\s*lowToday[^}]*|[^,]*,\s*low\s*:\s*lowToday\s*)},?\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g
|
||||
)
|
||||
);
|
||||
```
|
||||
@ -63,7 +63,7 @@ You should use destructuring to create the `highToday` variable.
|
||||
```js
|
||||
assert(
|
||||
code.match(
|
||||
/(var|const|let)\s*{\s*today\s*:\s*{\s*(high\s*:\s*highToday[^}]*|[^,]*,\s*high\s*:\s*highToday\s*)}\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g
|
||||
/(var|const|let)\s*{\s*today\s*:\s*{\s*(high\s*:\s*highToday[^}]*|[^,]*,\s*high\s*:\s*highToday,?\s*)},?\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
Loading…
Reference in New Issue
Block a user