Animate your name 10 of 15 arrays here is my code need help plz


#1

var red = [0, 100, 63];
var orange = [40, 100, 60];
var green = [75, 100, 40];
var blue = [196, 77, 55];
var purple = [280, 50, 60];

var myName = "Grant M. Smith";
drawName(myName, letterColors = [red, orange, blue]);


#2

Hi Grant,

You should create letterColors array just before you create the myName variable, then when you call drawName(), you pass in just letterColors.

Like this: (I've commented certain parts out)

var red = /* ... */;
var orange = /* ... */;
var green = /* ... */;
var blue = /* ... */;
var purple = /* ... */;

var letterColors = [red, orange, green, blue, purple];
var myName = /* ... */;

drawName(myName, letterColors);

#3

thx
you were a big help :smiley_cat: