fix(curriculum): allow optional semicolon in Linked List Step 5 (#66775)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Lakshminarasimhan
2026-04-04 04:10:31 +05:30
committed by GitHub
parent 53197ff838
commit 1ccedf93fb
@@ -22,7 +22,7 @@ assert.deepEqual(myList, initList());
You should log a call to `isEmpty(myList)` to the console.
```js
assert.match(__helpers.removeJSComments(code), /console\.log\(isEmpty\(myList\)\)/)
assert.match(__helpers.removeJSComments(code), /console\.log\(isEmpty\(myList\)\);?/)
```
You should call `add` with `myList` and a number of your choice as the parameters.
@@ -34,13 +34,13 @@ assert.match(__helpers.removeJSComments(code), /add\s*\(\s*myList\s*,\s*\d+\s*\)
You should log your `myList` variable to the console.
```js
assert.match(__helpers.removeJSComments(code), /console\.log\(myList\)/)
assert.match(__helpers.removeJSComments(code), /console\.log\(myList\);?/)
```
You should log `isEmpty(myList)` to the console again.
```js
assert.match(__helpers.removeJSComments(code), /console\.log\(myList\)\s*console\.log\(isEmpty\(myList\)\)/)
assert.match(__helpers.removeJSComments(code), /console\.log\(myList\);?\s*console\.log\(isEmpty\(myList\)\);?/)
```