Show and Hide Details

Write the code, see it run, pass the checks.

The problem

  • easy
  • Code

Build a section with a button labelled "Show details". Clicking it shows a paragraph reading "Details go here." and changes the button to "Hide details". Clicking it again hides the paragraph and changes the button back.

Your code must pass

  • The details are hidden at first
  • Clicking Show details shows them and relabels the button
  • Clicking Hide details hides them again