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

164
Vistas
(Canvas) i dont see the white color in my explorer, there is only the black color

I tried to code a snake game in my second day of coding. But the white color isn't showing up i reloaded the page a few times and it didn't work.

This is the code:

<canvas id="canvas" width="720" height="480"></canvas>

<script>
    let canvas = document.getElementById('canvas');
    let ctx = canvas.getContext('2d');

    
    draw();
    function draw() {
        ctx.fillstyle = 'black';
        ctx.fillRect(0, 0, canvas.width, canvas.height);
        ctx.fillstyle = 'white';
        ctx.fillRect(100, 150, 30, 30);

    }


    function gameLoop() {
        
    }

</script>
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