LocalStorage Assignments

  1. Store and Retrieve User Input
  2. Create a form with a text input and a button. When the user submits text, store it in localStorage and display it when the page reloads.

  3. Dark Mode Toggle
  4. Implement a dark mode switch that saves user preference in localStorage and applies it when the page loads.

  5. Simple Counter
  6. Create a button that increments a counter. Save the counter value in localStorage so it persists between page reloads.

  7. Remember User Name
  8. Ask the user for their name and store it in localStorage. Display a greeting using the stored name when the user revisits.

  9. Task List App
  10. Build a simple to-do list where users can add, remove, and mark tasks as complete. Save tasks in localStorage.

  11. Store User Preferences
  12. Allow users to set font size, background color, and text color. Store these settings in localStorage and apply them on load.

  13. Simple Shopping Cart
  14. Create a basic shopping cart where users can add and remove items. Save the cart items in localStorage.

  15. Quiz Progress Tracker
  16. Build a quiz where user answers are stored in localStorage, allowing them to resume later.

  17. Session Persistence for Login
  18. Simulate a login system where login status is stored in localStorage and persists until the user logs out.

  19. Autosave Feature for Notes App
  20. Develop a notes app that automatically saves user input to localStorage every few seconds.