Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

194
Vistas
How do I solve my issue with the forEach loop not working?

I keep getting an error saying .forEach is not a function I have a very similar function that runs just fine but I can't figure out how to fix this forEach issue

function populateRepsDiv(repsArray) {
  removeChildren(senatorDiv)
  repsArray.forEach(representative => {
    const repFigure = document.createElement('figure')
    const repImg = document.createElement('img')
    const repCaption = document.createElement('figcaption')

    repImg.src = representative.imgURL
    repCaption.textContent = representative.name

    repFigure.appendChild(repImg)
    repFigure.appendChild(figCaption)
    senatorDiv.appendChild(repFigure)

    console.log(representative.name)
  })
}
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda