Oliver Eyton-Williams bd68b70f3d
Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00

1.4 KiB

id, title, challengeType, videoUrl, forumTopicId
id title challengeType videoUrl forumTopicId
bad87fed1348bd9aedf08833 Delete HTML Elements 0 https://scrimba.com/p/pVMPUv/ckK73C9 17559

Description

Our phone doesn't have much vertical space. Let's remove the unnecessary elements so we can start building our CatPhotoApp.

Instructions

Delete your h1 element so we can simplify our view.

Tests

tests:
  - text: Your <code>h1</code> element should be deleted.
    testString: assert(!code.match(/<h1>/gi) && !code.match(/<\/h1>/gi));
  - text: Your <code>h2</code> element should be on the page.
    testString: assert(code.match(/<h2>[\w\W]*<\/h2>/gi));
  - text: Your <code>p</code> element should be on the page.
    testString: assert(code.match(/<p>[\w\W]*<\/p>/gi));

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

var code = "<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>"