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

Animate Your Name Forum

View Course » View Exercise

88 points
5a868cf1c1364d67bccbf97c44dd6232?s=140&d=retro
Submitted by
zacharywalton_53cdd5688c1ccce08d0007
over 2 years ago

12/15 [resolved] Write an if/else statement that makes the bubbles circle-shaped

I have read all other posts but they all look like the same problem, but I can't figure out mine.
Could someone help me on what is wrong with it? I get the
"
Oops, try again. Write an if/else statement that makes the bubbles circle-shaped. Adapt the if/else statement from the the example on the left.
"

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

else {
bubbleShape = "sqaure";
}


3 votes

permalink

Hi Zachary,

If statements work like this:

if (what is in here is true) {
    do this thing
}  otherwise {
   do this other thing
}

Looking at your code, if you want circles then you will need to put something that is true in the ( ).

Can you think of any equation that is true?

3691 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
over 2 years ago

2 Comments

5a868cf1c1364d67bccbf97c44dd6232?s=140&d=retro zacharywalton_53cdd5688c1ccce08d0007 over 2 years ago

Oh my. I just realized that I had misspelled the word "square."
I'm so sorry, but I did make it 10>3 along with fixing the misspelled word and it worked. Thank you so much.

55df2afa95e3787b9200005e_359368177 Judy over 2 years ago

You're welcome!


0 votes

permalink

I'm stuck on this one too!

262 points
53e9c0ac631fe94f78000ffe_848970849
Submitted by
georgie_pie01
over 2 years ago