Drawing Patterns explainer

Aim of the puzzle: Use a variable to create a pattern with drawBoxes().

Walk through of solution: Variables store data. For example,

var greenPattern = 'g gg ggg'

saves the string 'g gg ggg' to the variable greenPattern.

In the code that you start off with, drawBoxes() uses the greenPattern variable. To complete the puzzle, inside the parentheses of drawBoxes(), change greenPattern to orangePattern.

Sample code solution:
(Tap below to reveal)

var greenPattern = 'g gg ggg';
var orangePattern = 'ooo oo o';

drawBoxes(orangePattern);

Javascript Concepts: Variables, Strings
Grasshopper Concepts: drawBoxes()

1 Like

I completed the puzzle and get the following error: The starter code has been modified or removed. Use the reset button to reset the puzzle.

There is,NO reset button!

Hey there, on the mobile app, you can find the reset button here:

and on the website, you can find it here:

Hope this helps!
Ben