Write the logic to save the task array to localStorage. This ensures that when a user refreshes the page, their tasks are still there.