<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. --> - [x] I have read [freeCodeCamp's contribution guidelines](https://github.com/freeCodeCamp/freeCodeCamp/blob/master/CONTRIBUTING.md). - [x] My pull request has a descriptive title (not a vague title like `Update index.md`) - [x] My pull request targets the `master` branch of freeCodeCamp. - [x] None of my changes are plagiarized from another source without proper attribution. - [x] My article does not contain shortened URLs or affiliate links. If your pull request closes a GitHub issue, replace the XXXXX below with the issue number. Closes #XXXXX Co-authored-by: Paul Gamble <pgamble@gmail.com>
2.4 KiB
2.4 KiB
id, title, challengeType, videoUrl
id | title | challengeType | videoUrl |
---|---|---|---|
bad87fee1348bd9aedf08804 | Comment out HTML | 0 | https://scrimba.com/p/pVMPUv/cGyGbca |
Description
<!--
and to end a comment, you need to use -->
Here you'll need to end the comment before your h2
element begins.
Instructions
h1
element and your p
element, but not your h2
element.
Tests
tests:
- text: Comment out your <code>h1</code> element so that it is not visible on your page.
testString: assert(($("h1").length === 0), 'Comment out your <code>h1</code> element so that it is not visible on your page.');
- text: Leave your <code>h2</code> element uncommented so that it is visible on your page.
testString: assert(($("h2").length > 0), 'Leave your <code>h2</code> element uncommented so that it is visible on your page.');
- text: Comment out your <code>p</code> element so that it is not visible on your page.
testString: assert(($("p").length === 0), 'Comment out your <code>p</code> element so that it is not visible on your page.');
- text: Be sure to close each of your comments with <code>--></code>.
testString: assert(code.match(/[^fc]-->/g).length > 1, 'Be sure to close each of your comments with <code>--></code>.');
- text: Do not change the order of the <code>h1</code> <code>h2</code> or <code>p</code> in the code.
testString: assert((code.match(/<([a-z0-9]){1,2}>/g)[0]==="<h1>" && code.match(/<([a-z0-9]){1,2}>/g)[1]==="<h2>" && code.match(/<([a-z0-9]){1,2}>/g)[2]==="<p>") , 'Do not change the order of the <code>h1</code> <code>h2</code> or <code>p</code> in the code.');
Challenge Seed
<!--
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<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>
-->
Solution
<!--<h1>Hello World</h1>-->
<h2>CatPhotoApp</h2>
<!--<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> -->