This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Animate Your Name Forum

View Course » View Exercise

69 points
548278f5e5733892cdd874f99d98e4e7?s=140&d=retro
Submitted by
Amber Mason
over 2 years ago

10/15 Whats Wrong with My coding?

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

var yourname = ["Amber"];



letterColors = [red,  orange,  green,  blue,  purple];
drawName(myName, letterColors);

2 votes

permalink

Hi Amber,

When I copy/paste your code, I get this error message:

"Uncaught ReferenceError: myName is not defined"

That means you should look back to where you defined myName to check for a problem. When I do that, I find that you never did define myName. You instead defined a variable called yourname.

After you change yourname to myName, you will have a different error.

myName should be a string but you have made it an array. Remove the [ ] and then it will be a string.

3692 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
over 2 years ago

2 Comments

548278f5e5733892cdd874f99d98e4e7?s=140&d=retro Amber Mason over 2 years ago

I have tried that but still wont work

55df2afa95e3787b9200005e_359368177 Judy over 2 years ago

Hi Amber, please post your updated code. If you need it, here are instructions for posting code in this forum: http://www.codecademy.com/forum_questions/51d9e8f68c1cccc92403ffe8


1 vote

permalink

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 = "sally";
letterColors = [red, orange, green, blue, purple];

drawName(myName, letterColors);

It looks okay check to see if letterColours is on line 8 looks like you put it on a different line

59 points
5160dbb4fea5a408c190e7e5909775bc?s=140&d=retro
Submitted by
shedges01
over 2 years ago