To create the in CodeHS, you need to use nested for loops to place circles in a grid pattern . π Core Logic The goal is to create an grid of circles. The outer loop controls the rows (vertical movement). The inner loop controls the columns (horizontal movement). The spacing is determined by the radius of the circle. π» Solution Code javascript
Swapping row and col inside the setPosition function is the most common reason for a "sideways" or broken grid. Remember: X is Columns, Y is Rows. 9.1.6 checkerboard v1 codehs
The squares are outlined but not colored. Fix: You must call both setFillColor() and setFilled(true) . To create the in CodeHS, you need to
Use an if statement to check if the row index i is less than 3 or greater than 4. The inner loop controls the columns (horizontal movement)
within loops is the most straightforward method for version 1. Nested Loops
Text (console) output β using characters: