Exerpad
Exercise 1 · Chapter: Pixel ProjectsRequired+50 XP

Checkerboard

Create an 8x8 checkerboard pattern using "black" and "white".

The top-left square should be "black". Squares alternate colors like a real checkerboard:

Set __grid__ to your grid so you can see the result!

Don't change the console.log statements at the bottom — they're used to check your answer.

Expected output
8
8
black
white
black
Need a hint?
3 available · costs 5 XP each
javascript
let grid = [];
// Build an 8x8 checkerboard here
// Use "black" and "white"
// Top-left should be "black"


let __grid__ = grid;

// Don't change below this line
console.log(grid.length);
console.log(grid[0].length);
console.log(grid[0][0]);
console.log(grid[0][1]);
console.log(grid[7][7]);
Output
Run your code to see the output here.