File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
curriculum/challenges/english/25-front-end-development/workshop-magazine Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ assert(document.querySelectorAll('.lists li')?.length === 6);
2929Each of your new ` li` elements should have an ` h4` and ` p` element.
3030
3131` ` ` js
32- const lis = [... document .querySelectorAll (' .lists li' )];
33- assert (lis? .every (li => li? .children ? .[0 ]? .localName === ' h4' && li? .children ? .[1 ]? .localName === ' p' ));
32+ const lis = document .querySelectorAll (' .lists li' );
33+ assert .isNotEmpty (lis);
34+ lis .forEach (li => {
35+ assert .equal (li? .children ? .[0 ]? .localName , ' h4' );
36+ assert .equal (li? .children ? .[1 ]? .localName , ' p' );
37+ });
3438` ` `
3539
3640Your first ` h4` should have the text ` V1 - 2014 ` .
@@ -108,8 +112,11 @@ assert(document.querySelectorAll('.lists li p')?.[5]?.innerText === 'We launched
108112Your six ` h4` elements should each have the class ` list- subtitle` .
109113
110114` ` ` js
111- const h4s = [... document .querySelectorAll (' .lists li h4' )];
112- assert (h4s? .every (h4 => h4? .classList ? .contains (' list-subtitle' )));
115+ const h4s = document .querySelectorAll (' .lists li h4' );
116+ assert .isNotEmpty (h4s);
117+ h4s .forEach (h4 => {
118+ assert .isTrue (h4? .classList ? .contains (' list-subtitle' ));
119+ });
113120` ` `
114121
115122# --seed--
You can’t perform that action at this time.
0 commit comments