mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-07-01 21:01:20 +08:00
fix(curriculum): accept both multiplication orders in getRandomIndex test (#64233)
Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
This commit is contained in:
parent
db4aa92b1f
commit
770f926e00
@ -35,7 +35,7 @@ assert.isArray(darkColorsArr);
|
||||
You should fix the capitalization error in the `math.random()` line.
|
||||
|
||||
```js
|
||||
assert.match(getRandomIndex.toString(), /\s*darkColorsArr\.length\s*\*\s*Math\.random\(\s*\)\s*/);
|
||||
assert.match(getRandomIndex.toString(), /\s*(darkColorsArr\.length\s*\*\s*Math\.random\(\s*\)|Math\.random\(\s*\)\s*\*\s*darkColorsArr\.length)\s*/);
|
||||
```
|
||||
|
||||
You should round `darkColorsArr.length * Math.random()` down to the nearest whole number.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user