This forum is now read-only. Please use our new forums! Go to forums
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
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 ( )
.
Answer 54a0d33451b8870edd013f3a
if(15 > 5){ bubbleShape = “circle-shaped”; // remove -shaped —> bubbleShape = “circle”; } else { bubbleShape = “square”; } drawName(myName, letterColors);
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
2 comments
You´re right thanks. I think I proved it, but it not the case.
What did you put in the ( )?