--- id: 5efc575c8d6a74d05e68af77 title: Part 58 challengeType: 0 dashedName: part-58 --- # --description-- Add a final checkbox after the previous one with an `id` attribute value of `energetic`. The `name` and attribute should be the same as the last checkbox. Also add a `label` element to the right of the new checkbox with text `Energetic`. Make sure to associate the `label` element with the new checkbox. # --hints-- You need to add a new checkbox. ```js assert($('input[type="checkbox"]').length === 3); ``` Your new checkbox should have an `id` attribute with the value `energetic` and a `name` attribute with the value `personality`. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. ```js const checkboxes = [...$('input[type="checkbox"]')]; assert( checkboxes.some( (checkbox) => checkbox.id === 'energetic' && checkbox.getAttribute('name') === 'personality' ) ); ``` Your new checkbox should be after the first one. You have them in the wrong order. ```js const checkboxes = [...$('input[type="checkbox"]')].map( (checkbox) => checkbox.id ); assert(checkboxes.indexOf('lazy') < checkboxes.indexOf('energetic')); ``` On the right side of your new checkbox, there should be `label` element with the text `Energetic`. ```js const nextElementSibling = $('input[type="checkbox"]')[2].nextElementSibling; assert( nextElementSibling.nodeName === 'LABEL' && nextElementSibling.innerText.replace(/\s+/g, '').match(/^Energetic$/i) ); ``` The new `label` should have a `for` attribute with the same value as the `id` attribute of the new checkbox. You have either omitted the value or have a typo. ```js assert( $('input[type="checkbox"]')[2].nextElementSibling.getAttribute('for') === 'energetic' ); ``` # --seed-- ## --seed-contents-- ```html

CatPhotoApp

Cat Photos

Click here to view more cat photos.

A cute orange cat lying on its back.

Cat Lists

Things cats love:

A slice of lasagna on a plate.
Cats love lasagna.

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
Five cats looking around a field.
Cats hate other cats.

Cat Form

Is your cat an indoor or outdoor cat?
What's your cat's personality? --fcc-editable-region-- --fcc-editable-region--
```