--- id: 642df9df4b5216350de7b0d2 title: Step 6 challengeType: 0 dashedName: step-6 --- # --description-- You will need a function to generate a range of numbers. Declare an empty `range` function which takes a `start` and `end` parameter. Use the `Array()` constructor and implicitly return an empty array. # --hints-- You should declare a `range` variable. ```js assert.match(code, /(?:let|var|const)\s+range/); ``` You should use `const` to declare your `range` variable. ```js assert.match(code, /const\s+range/); ``` Your `range` variable should be a function. ```js assert.isFunction(range); ``` Your `range` function should use arrow syntax. ```js assert.match(code, /const\s+range\s*=\s*\(.*\)\s*=>/); ``` Your `range` function should take a `start` parameter first. ```js assert.match(code, /const\s+range\s*=\s*\(\s*start/) ``` Your `range` function should take an `end` parameter second. ```js assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)/); ``` Your `range` function should use an implicit return. Remember that this means you will not use curly brackets. ```js assert.notMatch(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*{/); ``` Your `range` function should use the `Array()` constructor. Primitive constructors do not need the `new` keyword. ```js assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(/); ``` You should not pass anything to the `Array()` constructor. ```js assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\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-- --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); } } ```