Learn Functional Programming by Building a Spreadsheet - Step 8

Tell us what’s happening:

What does it meaning :" you should call the .fill() method on your Array() constructor." ?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="./styles.css" />
    <title>Functional Programming Spreadsheet</title>
    <div id="container">
    <script src="./script.js"></script>
/* file: styles.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;
/* file: script.js */

// User Editable Region

const range = (start, end) => Array().fill();

// User Editable Region

window.onload = () => {
  const container = document.getElementById("container");
  const createLabel = (name) => {
    const label = document.createElement("div");
    label.className = "label";
    label.textContent = name;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Learn Functional Programming by Building a Spreadsheet - Step 8

it means that you need to chain fill() to the Array() call

I tried do Array() dot fill(start) … but not pass … I dont understand indeed ! Can give another hint ?

can you show your code with that please?

const range = (start, end) => Array().fill(start);

that is correct, but you deleted the argument from Array, so please reset the step and try again

okay … done it . tks very much :grinning: grinning: