Practice
JavaScriptData StructuresReactConcepts
Sign in
← Back to problems

Reveal a Hidden Message

DOM & Eventseasy

Course · Section 7: JavaScript in the Browser: DOM and Events · Lecture 76: Selecting and Manipulating Elements

The page has `<p id='msg' hidden>` which is currently hidden. Make it visible by clearing the hidden state.

Sample tests

Input: #msg is no longer hidden
Output: assertion passes

+ 1 hidden test run on Submit.

Hints

Common pitfalls
  • Setting style.display alone leaves the hidden attribute in place.

Learning resources

  • MDN: HTMLElement.dataset
Approach & explanation (try first)

Clearing the hidden property reveals the element by removing the boolean attribute.

Loading...
⌘/Ctrl + Enter

Run your code to see results.