if and while statements

2 replies [Last post]
amanda southworth
Title: NooBot
Joined: 09/08/2014
Posts:
BotPoints: 18
User offline. Last seen 8 years 39 weeks ago.

hello!

I am not new to programming, but I never bothered to learn if and while statements. Can someone break them down and explain them to me, and how to do them? Thank you in advance.

-Amanda

ruler501
ruler501's picture
Title: NooBot
Joined: 01/29/2012
Posts:
BotPoints: 367
User offline. Last seen 8 years 4 weeks ago.

if(a){ b; }
This will execute b if and only if a is true.

while(a) { b; }
This will execute b as long as a is true

milanjoy
Title: NooBot
Joined: 06/13/2017
Posts:
BotPoints: 778
User offline. Last seen 22 hours 33 min ago.

It's really good to see the details regarding the If and While statement discussed diamond rings here. This kind of if and while statements are really necessary for doing programming. Good to see the details you have discussed here and I am looking here to more updates on that. Keep sharing more such details over here.