Files
Shaun Hamilton 25aa04e2e7 chore(curriculum): standardise titles for rwd-beta (#45398)
* chore(curriculum): accessibility-quiz

* chore(curriculum): cafe-menu

* chore(curriculum): ferris-wheel

* chore(curriculum): fix ferris-wheel tests

* chore(curriculum): colored-markers

* chore(curriculum): photo-gallery

* chore(curriculum): magazine

* chore(curriculum): penguin

* chore(curriculum): city-skyline

* chore(curriculum): registration-form

* chore(curriculum): picasso-painting

* chore(curriculum): balance-sheet

* chore(curriculum): piano

* chore(curriculum): rothko-painting

* fix: title min 15 chars
2022-03-14 16:54:43 +01:00

2.1 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
612e813b3ba67633222cbe54 Step 6 0 step-6

--description--

Remember that a class attribute can have multiple values. To separate your white keys from your black keys, you'll add a second class value of black--key. Add this to your second, third, fifth, sixth, and seventh .key elements.

--hints--

Your second .key element should also have a class of black--key.

const key = document.querySelectorAll('.key')?.[1];
assert(key?.className?.includes('black--key'));

Your third .key should have black--key in the class.

const third = document.querySelectorAll('.key')?.[2];
assert(third?.classList?.contains('black--key'));

Your fifth .key should have black--key in the class.

const fifth = document.querySelectorAll('.key')?.[4];
assert(fifth?.classList?.contains('black--key'));

Your sixth .key should have black--key in the class.

const sixth = document.querySelectorAll('.key')?.[5];
assert(sixth?.classList?.contains('black--key'));

Your seventh .key should have black--key in the class.

const seventh = document.querySelectorAll('.key')?.[6];
assert(seventh?.classList?.contains('black--key'));

You should have five .black--key elements.

const blackKeys = document.querySelectorAll('.black--key');
assert(blackKeys?.length === 5);

You should have seven .key elements.

const keys = document.querySelectorAll('.key');
assert(keys?.length === 7);

--seed--

--seed-contents--

<!DOCTYPE html>
<html>
  <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 class="key"></div>
        <div class="key"></div>
        <div class="key"></div>
        <div class="key"></div>
        <div class="key"></div>
        <div class="key"></div>
        <div class="key"></div>
      </div>
    </div>
    --fcc-editable-region--
  </body>
</html>