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

Animate Your Name Forum

View Course » View Exercise

281 points
Picture
Submitted by
Luke Beadle
about 3 years ago

12/15 [resolved] What's wrong with my code?

Ok so im stuck.... here is the code i have currently

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 = "queen egg";
letterColors = [red,orange,green,blue,purple]
if(15 > 5){bubbleShape = "circle";}
else {bubbleShape = "Square";}

drawName(myName, letterColors);

i get the "Oops, try again. Make sure to use bubbleShape inside an if/else statement, like in the example on the left."
error message,

i cant understand the problem or how to fix it.

Please help.


0 votes

permalink

Hi Luke,

When I try your code I get this error message:

Make sure to use bubbleShape =
"square" inside an if/else statement,
like in the example on the left.

The important part there is that the exercise is looking for "square" but you have "Square". JavaScript is case sensitive so you have to pay attention to that.

3698 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
about 3 years ago

1 Comment

Picture Luke Beadle about 3 years ago

That has solved it, i will need to pay attention to the case in future. Many thanks