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

162
Views
(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
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!