mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): random background random color method placement in step 3 (#55316)
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ Remember that you worked with a method in the Role Playing Game that rounds a nu
|
||||
You should round `darkColorsArr.length * Math.random()` down to the nearest whole number.
|
||||
|
||||
```js
|
||||
assert.match(getRandomIndex.toString(), /console\.log\(\s*Math\.floor\(\s*darkColorsArr\.length\s*\*\s*Math\.random\(\s*\)\s*\)\s*\)/);
|
||||
assert.match(getRandomIndex.toString(), /console\.log\(\s*Math\.floor\(\s*(darkColorsArr\.length\s*\*\s*Math\.random\(\s*\)|Math\.random\(\s*\)\s*\*\s*darkColorsArr\.length)\s*\)\s*\)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user