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

Animate Your Name Forum

View Course

629 points
Submitted by
over 3 years ago

12/15 Why is 10 < 3?

While I'm having no trouble with the code, the following statement confuses me:

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

So if 10 is less than 3, then the bubble shape will be a circle. And according to this, 10 < 3 is true. But we all know that 10 is a higher number than 3, so I must be missing something here. I just want to know so I don't run into similar confusion in the future. Thanks!

0 votes


10 will never be less than 3 so that code there will always give you square bubbles -- except that you've used bubbleshape instead of bubbleShape so it falls back on the default which happens to be "circle".

3698 points
Submitted by
over 3 years ago