mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-22 21:08:12 +08:00
fix(curriculum): test for unique characters (#62544)
This commit is contained in:
parent
8238495c8b
commit
8b8e27bf37
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user