If/Else statement not working?


#1

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

else {
bubbleShape = "square";
}

drawName(myName, letterColors);

The lesson just keeps telling me to write an if/else statement that makes bubbles circle shaped. I already did that and i checked every part of the main.js


#2

since when is 10 less than (<) 3?


#3

@cheesy1343 I think I see the issue.

Try switching "circle" and square.

@dantemp 10 < 3 is always false. The if statement evaluates 10 < 3, so that bubbleShape = 'square' will fail and cause the else statement (bubblShape = 'circle') to pass, since the goal is to animate the user's name with bubbles.


#4

Ok but what are the meaning of these numbers, what are they representing ? it’s 10 for the numbers of letters ?


#6