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

Animate Your Name Forum

View Course » View Exercise

176 points
530de25b7c82cae56f003bc5_760398726
Submitted by
Sherry.K
about 3 years ago

12/15 [resolved] I don't know what is wrong...

var names= ["Sherry Kwon"]
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 = "Sherry Kwon";
letterColors= [blue,orange,green]
if(10 < 3) {
bubbleShape= "circle";
}

else {
bubbleShape = "square";
}

All together, the if/else statement looks like this:


2 votes

permalink

Try with true fact if (10 > 3) q and don 't change other things in strating explanation of codecademy and your code is going to work. See this beauty of source code :
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 = "Valentin";
var letterColors = [red , orange , green , blue , purple];
if(10 > 3) {
bubbleShape = "circle";
}

else {
bubbleShape = "square";
}

drawName(myName, letterColors);
and this one works perfect.

213 points
531b79587c82cad45e002559_414186014
Submitted by
Валентин Георгиев
about 3 years ago


1 vote

permalink

Hi Sherry,

Here is how an if/else statement works:

if (this is true) {
    do this thing;
} else {
    do this other thing;
}

This exercise is trying to get you to do this thing: bubbleShape = "circle".

Do you see how you can make that happen by adjusting what you put in place of (this is true)?

3691 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
about 3 years ago

1 Comment

531b79587c82cad45e002559_414186014 Валентин Георгиев about 3 years ago

That 's right!


1 vote

permalink

Hi Sherry, it looks like you have a working Animate Your Name codebit now so I'm going to mark your question as [resolved].

If anyone else still has questions just use the green "Ask a question" button.

3691 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
about 3 years ago