--- id: 642e0011c45c893845842058 title: Step 8 challengeType: 0 dashedName: step-8 --- # --description-- The `Array()` constructor has a `.fill()` method which can be used to fill an array with a value. You can use this to fill your array with the `start` value. Chain the `.fill()` method to your `Array()` constructor, and pass it the `start` value. # --hints-- You should use the `.fill()` method. ```js assert.match(code, /\.fill\(/); ``` You should call the `.fill()` method on your `Array()` constructor. ```js assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(/); ``` You should pass `start` to the `.fill()` method. ```js assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)/); ``` # --seed-- ## --seed-contents-- ```html Functional Programming Spreadsheet
``` ```css #container { display: grid; grid-template-columns: 50px repeat(10, 200px); grid-template-rows: repeat(11, 30px); } .label { background-color: lightgray; text-align: center; vertical-align: middle; line-height: 30px; } ``` ```js --fcc-editable-region-- const range = (start, end) => Array(end - start + 1); --fcc-editable-region-- window.onload = () => { const container = document.getElementById("container"); const createLabel = (name) => { const label = document.createElement("div"); label.className = "label"; label.textContent = name; container.appendChild(label); } } ```