DOM Playground

Read the script at the bottom of the page. Open the Console (Cmd/Ctrl + Shift + J) and watch what prints.

1. Toggle a class

One button, one box. The class does the styling; JS just switches it on and off.

2. Show / hide an element

Here is the hidden message. 👀

3. Change text & change the page theme

4. Add & remove elements

5. Slide-out menu