Cat Photos
Click here to view more cat photos.

Cat Lists
Things cats love:
- cat nip
- laser pointers
- lasagna

Top 3 things cats hate:
- flea treatment
- thunder
- other cats

--- id: 5ef9b03c81a63668521804e3 title: Step 57 challengeType: 0 dashedName: step-57 --- # --description-- Add another checkbox after the one you just added. The `id` attribute value should be `lazy` and the `name` attribute value should be the same as the last checkbox. Also add a `label` element to the right of the new checkbox with the text `Lazy`. Make sure to associate the `label` element with the new checkbox using the `for` attribute. # --hints-- You need to add a new checkbox. ```js assert($('input[type="checkbox"]').length === 2); ``` Your new checkbox should have an `id` attribute with the value `lazy` 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 === 'lazy' && 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('loving') < checkboxes.indexOf('lazy')); ``` On the right side of your new checkbox, there should be `label` element with the text `Lazy`. ```js const nextElementSibling = $('input[type="checkbox"]')[1].nextElementSibling; assert( nextElementSibling.nodeName === 'LABEL' && nextElementSibling.innerText.replace(/\s+/g, '').match(/^Lazy$/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"]')[1].nextElementSibling.getAttribute('for') === 'lazy' ); ``` # --seed-- ## --seed-contents-- ```html
Click here to view more cat photos.