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

0 points
Submitted by theoricalMan
over 9 years

12/15 Error en la condición IF

Me da el siguiente error y no entiendo el por qué:

¡Uy! Probá otra vez. Write an if/else statement that makes the bubbles circle-shaped. Adapt the if/else statement from the the example on the left.

Si realmente tengo el if adaptado para que cumpla esa condición:

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 = “Mario”; var letterColors = [red,orange,green,blue,purple]; if(15 > 5){ bubbleShape = “circle-shaped”; } else { bubbleShape = “square”; } drawName(myName, letterColors);

He probado a cambiar circle-shaped por circle solo y otras opciones y nada.

Answer 549efcad937676c8fe01151f

0 votes

Permalink

Hi Mario,

The program only understands circle not circle-shaped.

Also, if statements work like this:

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

If you want to do the first thing, which in this case is, bubbleShape = "circle"; then you will have to put something true in the ( ).

points
Submitted by Judy
over 9 years

2 comments

theoricalMan over 9 years

You´re right thanks. I think I proved it, but it not the case.

Judy over 9 years

What did you put in the ( )?

Answer 54a0d33451b8870edd013f3a

0 votes

Permalink

if(15 > 5){ bubbleShape = “circle-shaped”; // remove -shaped —> bubbleShape = “circle”; } else { bubbleShape = “square”; } drawName(myName, letterColors);

points
Submitted by Richard Cain
about 9 years

2 comments

mrcrazyg about 9 years

this didn’t work for me

Dason Hrynkiw about 9 years

me too