testString: 'assert($("ul li").length > 2, "You should have three <code>li</code> elements within your <code>ul</code> element.");'
- text: 确保你的<code>ul</code>元素有一个结束标记。
testString: 'assert(code.match(/<\/ul>/gi) && code.match(/<ul/gi)&&code.match(/<\/ul>/gi).length === code.match(/<ul/gi).length,"Makesureyour<code>ul</code> element has a closing tag.");'
- text: 确保您的<code>li</code>元素具有结束标记。
testString: 'assert(code.match(/<\/li>/gi) && code.match(/<li[\s>]/gi) && code.match(/<\/li>/gi).length === code.match(/<li[\s>]/gi).length, "Make sure your <code>li</code> elements have closing tags.");'
testString: assert($("ul li").filter((_, item) => !$(item).text().trim()).length === 0, 'Make sure your <code>li</code> elements don\’t contain an empty string or only white-space.');
<p>Click here to view more <ahref="#">cat photos</a>.</p>
<ahref="#"><imgsrc="https://bit.ly/fcc-relaxing-cat"alt="A cute orange cat lying on its back."></a>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>