You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/25-front-end-development/workshop-fcc-authors-page/641da5462576784453146ec2.md
+27-12Lines changed: 27 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,48 +7,63 @@ dashedName: step-7
7
7
8
8
# --description--
9
9
10
-
Now that you have the data you want, you can use it to populate the UI. But the fetched data contains an array of 26 authors, and if you add them all to the page at the same time, it could lead to poor performance.
10
+
Now that you have the data you want, you can use it to populate the UI.
11
11
12
-
Instead, you should add 8 authors at a time, and have a button to add 8 more until there's no more data to display.
12
+
But the data you are fetching will have a total of 26 authors. Instead of displaying all 26 authors at once, you should display 8 authors at a time.
13
13
14
-
Use `let` to create 2 variables named `startingIndex` and `endingIndex`, and assign them the number values `0` and `8`, respectively. Also, create an `authorDataArr` variable with `let` and set it to an empty array.
14
+
Start by using the `let` keyword to create two variables named `startingIndex` and `endingIndex`, and assign them the numbers `0` and `8`, respectively. You will need to use `let` here because you will be reassigning these values later on.
15
+
16
+
Then, create an `authorDataArr` variable and assign it an empty array.
15
17
16
18
# --hints--
17
19
18
20
You should use `let` to declare a variable named `startingIndex`.
19
21
20
22
```js
21
-
assert.match(code,/let\s+startingIndex/)
23
+
assert.match(code,/let\s+startingIndex/);
22
24
```
23
25
24
-
You should set your `startingIndex` variable to `0`.
0 commit comments