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

193
Vistas
how do I repeat an image in java script using a for loop so that the picture is printed multiple times in the browser

so I have a little sailboat with a drawing of the moon and the sun. How would I create a for loop so that the sailboat, moon and the sun all are repeated across the x and y axis's without repeating the same instructions over and over. The code I made doesn't run when I save it and open the file.

for(var x = 0; x <= 600; x+200) 
                {
                    for(var y = 0; y <= 600; y+200)
                    {
                            drawWholeBoat(ctx, 200, 300); 
                    }
                }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Replace with this code, check comments for details:

for (let x = 0; x <= 600; x += 200) {
    for (let y = 0; y <= 600; y += 200) {
      drawWholeBoat(ctx, x, y);
    }
}
about 4 years ago · Juan Pablo Isaza Denunciar
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