Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!