So right now my countdown loop goes "5,4,3,2,1," Is there a way to add something so that when it goes to 1 there is no more comma? Thank you! I am taking my first Javascript class so I apologize if my question is very basic.
U
User 11816233
@User 11816233
Posts
-
Changing the last text of a loop -
How to shorten/combine "if()" statements?Is there a way to shorten or combine if() statements? Currently I have if age<21 there is an alert, then else if age>21 there is an alert, another else if age==21 alert, and an else alert. Is there a way to combine age<21, age>21, age==21 into one statement with their individual alerts? Thanks, I am taking my first Javascript class right now.