--- id: 642df32c0c2db433d8b46d46 title: Step 5 challengeType: 0 dashedName: step-5 --- # --description-- Finally, use the `.appendChild()` method to add your `label` element to the `container` element. # --hints-- You should access the `.appendChild()` method of the `container` element. ```js assert.match(code, /container\.appendChild\(/); ``` You should pass your `label` element to the `.appendChild()` method. ```js assert.match(code, /container\.appendChild\(\s*label\s*\)/); ``` You should append `label` after setting the attributes. ```js assert.match(code, /const\s+label\s*=\s*document\.createElement\(\s*('|"|`)div\1\s*\)\s*;?\s*label\.className\s*=\s*('|"|`)label\2\s*;?\s*label\.textContent\s*=\s*name\s*;?\s*container\.appendChild\(\s*label\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-- window.onload = () => { const container = document.getElementById("container"); const createLabel = (name) => { const label = document.createElement("div"); label.className = "label"; label.textContent = name; } } --fcc-editable-region-- ```