mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-28 14:01:32 -05:00
fix(curriculum): replace rows[2] with rows[rows.length - 1] in step 20 of JS building a pyramid generator project (#54746)
This commit is contained in:
committed by
GitHub
parent
86860e85a5
commit
7fc8b5ecbd
@@ -7,7 +7,7 @@ dashedName: step-20
|
||||
|
||||
# --description--
|
||||
|
||||
For now, remove your first console log and your `rows[2]` assignment. Leave the second `rows` log statement for later.
|
||||
For now, remove your first console log and your `rows[rows.length - 1]` assignment. Leave the second `rows` log statement for later.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -17,10 +17,10 @@ You should remove your `console.log(rows[0])` statement.
|
||||
assert.notMatch(code, /console\.log\(\s*rows\[\s*0\s*\]\s*\)/);
|
||||
```
|
||||
|
||||
You should remove your `rows[2]` reassignment.
|
||||
You should remove your `rows[rows.length - 1]` reassignment.
|
||||
|
||||
```js
|
||||
assert.notMatch(code, /rows\[2\]/);
|
||||
assert.notMatch(code, /rows\[\s*rows\.length\s*-\s*1\s*\]/);
|
||||
```
|
||||
|
||||
You should not remove your `console.log(rows)` statement.
|
||||
|
||||
Reference in New Issue
Block a user