Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

110
Vistas
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.

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

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

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos