This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Amber Mason
almost 9 years

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

Answer 557cd22dd3292fa68d0004a3

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.

points
Submitted by Judy
almost 9 years

2 comments

Amber Mason almost 9 years

I have tried that but still wont work

Judy almost 9 years

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

Answer 5579eaa0d3292fb47a00041f

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

points
Submitted by shedges01
almost 9 years