mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-23 22:00:38 -04:00
fix(curriculum): rephrase the fillArrContainer description (#62356)
This commit is contained in:
@@ -20,7 +20,7 @@ For this lab, you have been provided with all the HTML and CSS. You will use Jav
|
||||
1. You should have a function named `generateArray` that uses the `generateElement` function to return an array containing five random integers.
|
||||
1. You should have a function named `generateContainer` that creates and returns an empty `div` element.
|
||||
1. You should have a function named `fillArrContainer` that takes an HTML element as the first argument and an array as the second argument.
|
||||
1. The `fillArrContainer` function should fill the element passed as the first argument to the function with five `span` elements with the text of an integer from the array passed as the second argument to the function.
|
||||
1. The `fillArrContainer` should take an element as its first parameter and an array of integers as its second parameter, then populate the element with five `span` elements, with each `span` showing one of the integers from the array.
|
||||
1. You should have a function named `isOrdered` that takes two integers and returns a boolean indicating if the first integer is less than or equal to the second.
|
||||
1. You should have a function named `swapElements` that takes an array of integers and a numeric index.
|
||||
1. The `swapElements` function should modify the array in place by swapping the element at the passed index and the following element if `isOrdered` returns `false`.
|
||||
@@ -105,7 +105,7 @@ You should have a function named `fillArrContainer`.
|
||||
assert.isFunction(fillArrContainer);
|
||||
```
|
||||
|
||||
Your `fillArrContainer()` function should fill the element passed as the first argument to the function with five `span` elements with the text of an integer from the array passed as the second argument to the function.
|
||||
Your `fillArrContainer()` should take an element as its first parameter and an array of integers as its second parameter, then populate the element with five `span` elements, with each `span` showing one of the integers from the array.
|
||||
|
||||
```js
|
||||
const testDiv = document.createElement("div");
|
||||
|
||||
Reference in New Issue
Block a user