mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-19 13:00:51 -04:00
fix(curriculum): separate empty string test in Sentence Analyzer (#57686)
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
This commit is contained in:
@@ -54,7 +54,13 @@ Your `getWordCount` function should return the correct word count for any senten
|
||||
assert.strictEqual(getWordCount("freeCodeCamp has a great community of kind people"), 8);
|
||||
assert.strictEqual(getWordCount("The freeCodeCamp curriculum is constantly updated"), 6);
|
||||
assert.strictEqual(getWordCount("freeCodeCamp teaches both frontend and backend development"), 7);
|
||||
```
|
||||
|
||||
Your `getWordCount` function should return the correct word count for an empty string, or a string only with spaces.
|
||||
|
||||
```js
|
||||
assert.strictEqual(getWordCount(""), 0);
|
||||
assert.strictEqual(getWordCount(" "), 0);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user