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

136
Views
Is there an efficient way to create an image array in Javascript without having to add each individual image into an array?

is there a way in Javascript to access a file of many images without having to code each individual image separately?
I'm looking for something that pretty much accesses the whole folder with as little coding as possible, does it exist?
I've added a screenshot to illustrate. The images are in myImage folder and the array can be seen in the script but I'm wanting something more efficient. This is the code but there will be many more images to add

var URLs = [ "/myImage/2.png", "/myImage/2.png"
           , "/myImage/3.png", "/myImage/3.png"
           , "/myImage/4.png", "/myImage/4.png" ];
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!