Skip to content
Advertisement

How do I create a checker board pattern?

I am trying to write a code that can generate an checker board pattern. The final image size should be 100 x 100, the checker board size 5 x 5, such that each box has dimensions h/5 and w/5. The code I have is wrong:

JavaScript

Advertisement

Answer

I know it’s already been answered, here’s a way to loop over it differently

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement