• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

233
Views
How can I add localStorage and Json(parse, stringify) to my JS project?

I'm working on a random password generator app using JavaScript. I want to add localStorage to store the passwords that were generated but have no idea on how to do it.

I've tried using a localStorage.setItem and localStorage.getItem but I cannot get it working.

I would really appreciate if someone could give me a hand , I'll leave the JS code down below.

Thanks.

about 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I want to add localStorage to store the passwords that were generated

Your code is correct. When you click on "copiar" button, the click event handler is called which stores the password to localStorage. If you are using Chrome, you can check the Application tab in Chrome Dev tools to check that it is being stored. enter image description here

about 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error