DevJourney · code I wrote while learning
Worksheet 4
7 items- 1. Write a JavaScript program that creates a button and add a click event listener to log a message when it's clicked—
- 2. Create a dropdown menu that shows and hides its options when clicked—
- 3. Change the background color of an element when a mouse enters it—
- 4. Form validation that displays an error message if a required field is left empty when submitting the form—
- 5. A toggle switch that changes its state when clicked—
- 6. Listens for a double click on an element and performs a specific action—
- 7. Drag-and-drop functionality to allow users to reorder items in a list—