Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda