curriculum/challenges/english/blocks/workshop-piano/612e804c54d5e7308d7ebe56.md
Within your .keys element, add seven div elements, each with the class key.
You should create seven new div elements.
const divDivDiv = document.querySelectorAll('div');
assert.lengthOf(divDivDiv, 9);
Your seven new div elements should be within your .keys element.
const keys = document.querySelector('.keys');
assert.lengthOf([...keys?.children], 7);
[...keys?.children].forEach(
child => assert.equal(child.tagName, 'DIV')
)
Your seven new div elements should all have the class set to key.
const keys = document.querySelector('.keys');
[...keys?.children].forEach(child => assert.isTrue(child?.classList.contains('key')));
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Piano</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
--fcc-editable-region--
<div id="piano">
<div class="keys"></div>
</div>
--fcc-editable-region--
</body>
</html>