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

0 points
Submitted by Luke Beadle
over 9 years

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.

Answer 53ef95ef548c35ca2b001b61

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.

points
Submitted by Judy
over 9 years

1 comments

Luke Beadle over 9 years

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