Exerpad
Exercise 2 · Chapter: Pixel ProjectsRequired+50 XP

French Flag

Draw the French flag as a 10x15 grid.

The French flag has three vertical stripes:

  • Left 5 columns: "blue"
  • Middle 5 columns: "white"
  • Right 5 columns: "red"

Set __grid__ to your grid to see the flag!

Don't change the console.log statements at the bottom.

Expected output
10
15
blue
white
red
Need a hint?
3 available · costs 5 XP each
javascript
let grid = [];
// Build a 10x15 French flag
// Left 5 cols: "blue", Middle 5: "white", Right 5: "red"


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][7]);
console.log(grid[0][14]);
Output
Run your code to see the output here.