Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
Is there any way to change the data.js file in local machine with user input?

I have data.js file and addPet.js file.

data.js file has objects in dataObject which is the list of the animals.

addPet.js file accepts user input from index.html.

In this case if I put infos in form input and submit it, then the data.js file has that input infos as last object in dataObject in data.js file?

The end goal is rendering the dataObject in the website(which exist as script.js)

const dataObject = {
  1: {
    name: "Fido",
    type: "dog",
    nature: "playful",
    status: "available",
  },
  2: {
    name: "Benson",
    type: "cat",
    nature: "jittery",
    status: "homed",
  },
  3: {
    name: "Esio",
    type: "tortoise",
    nature: "excitable",
    status: "available",
  },
  4: {
    name: "Turbo",
    type: "tortoise",
    nature: "relaxed",
    status: "available",
  },
  5: {
    name: "Ron Possible",
    type: "hamster",
    nature: "playful",
    status: "available",
  },
};

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda