mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-13 16:04:36 -04:00
fix(curriculum): test for unique characters (#62544)
This commit is contained in:
@@ -52,6 +52,15 @@ for (let char of password) {
|
||||
}
|
||||
```
|
||||
|
||||
Your function should return a randomly generated password which contains more than one unique character.
|
||||
|
||||
```js
|
||||
const passwordSetSize1 = new Set(generatePassword(12)).size;
|
||||
const passwordSetSize2 = new Set(generatePassword(12)).size;
|
||||
const passwordSetSize3 = new Set(generatePassword(12)).size;
|
||||
assert.isAbove(passwordSetSize1 + passwordSetSize2 + passwordSetSize3, 3);
|
||||
```
|
||||
|
||||
Your function should return a new random string each time it is called.
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user