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

142
Visualizações
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
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