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

Animate Your Name Forum

View Course » View Exercise

388 points
32e3526355d02a8147691132e11186c5?s=140&d=retro
Submitted by
Mohi
about 3 years ago

12/15 [resolved] Whats wrong here?

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

else {
bubbleShape = "square";
} 

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

drawName(myName, letterColors);

1 vote

permalink

What is exactly wrong? Is the computer not allowing you to go to the next step?

174 points
533fcac5282ae30f87001d37_676734005
Submitted by
Sebastien
about 3 years ago

3 Comments

Picture Tyler Rieves almost 3 years ago

I'm getting the exact same problem

55df2afa95e3787b9200005e_359368177 Judy almost 3 years ago

What is the error message that you are seeing Tyler? Show us your code.

32e3526355d02a8147691132e11186c5?s=140&d=retro Mohi almost 3 years ago

SyntaxError: missing ; before statement..


1 vote

permalink

the real thing that is wrong is that
if(10 > 3) till "bubble shape= "circle"
are all together.

45 points
539f5b1e282ae3ad1b00009b_226534793
Submitted by
Madison
almost 3 years ago


0 votes

permalink

get your fist statement false.. the opposite you did.. your code is right but its just a codecademy thing doesnt accept it your way. So you can change it to like this.

(10 < 3) {
bubbleShape = "square";
}
else
{
bubbleShape = "circle";
}

215 points
Aeb5ad20c24bada0590023682bfe21a4?s=140&d=retro
Submitted by
ruwan123
almost 3 years ago

1 Comment

32e3526355d02a8147691132e11186c5?s=140&d=retro Mohi almost 3 years ago

No, it didn't work...

Oops, try again. Make sure you have defined all the variables!
SyntaxError: missing ; before statement.. this is what I'm facing


0 votes

permalink

I just removed this "All together, the if/else statement looks like this:" and it allowed me to go to next lesson

388 points
32e3526355d02a8147691132e11186c5?s=140&d=retro
Submitted by
Mohi
almost 3 years ago

1 Comment

55df2afa95e3787b9200005e_359368177 Judy almost 3 years ago

Mohl, that's good news. I don't think we realized that you had that sentence included in your code.


0 votes

permalink

This is mine:
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 = "Hope";
letterColors= [red, orange, green, blue, purple]
if(10>3)
bubbleShape = ( "circle" )
{
else
}
bubbleShape = ( "square" )
}

drawName(myName, letterColors);
It says "Oops! Make sure you have defined all the variables!"

73 points
Fc6f45caaf5b7a49a8ba36d7d4cc23a9?s=140&d=retro
Submitted by
Hope Wolf
almost 3 years ago

1 Comment

55df2afa95e3787b9200005e_359368177 Judy almost 3 years ago

It you take the ( ) off your strings do you still see that error?