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()