JavaScript Practice Tasks
Practice by building small browser features. These tasks are designed to help both developers and automation testers.
DOM Tasks
- Create a counter with increment, decrement, and reset buttons.
- Build a live search filter for a list of course cards.
- Show and hide a modal using button clicks.
Form Tasks
- Validate an email field before submit.
- Disable the submit button until required fields are filled.
- Show inline error messages for invalid input.
API Tasks
- Fetch users from an API and render cards.
- Add loading, empty, and error states.
- Write test scenarios for slow network and failed API responses.
Interview Questions
- What is the DOM?
- What is event bubbling?
- What is the difference between synchronous and asynchronous code?
- Why should fetch errors be handled explicitly?