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

222
Views
Create code on using input? Javascipt GUI

I'm programming a web-app on electron and need the app to do some stuff based on use input:

basically, on a user input, my code saves var string = "stuff" then on another input it saves var string = "other_stuff is it possible to

#1 - detect how many times the user has inputted to get a var and save it using something like var string_1 = "stuff" and var string_2 = "other_stuff" etc

#2 - when these buttons are pressed, create code within a loop (that will be ran on a buttonpress) that looks something along the lines of this

try{
  function('string_1');
}
catch (error)
  console.log(error);

try{
  function('string_2');
}
catch (error)
  console.log(error);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

On button press use array.push(str); to add to the end of an array.

Then use

function txt_download(str) {
    // code stuff
}

for (const element of array) {
    txt_download(element)
}

To run the functions

about 4 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 Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!