+ 2

Someone can explain me more about{if and alse} becouse I getting confused??

5th Jun 2017, 4:57 PM
Suaad
Suaad - avatar
3 odpowiedzi
+ 5
if this statement is true, do something. else, if that was false, if this statement is true, do something. else, if everything was false, do something. Or, if written in code: if(condition) { // do something if true } else if(condition) { // do something if true, if above was false } else { // do something if all are false } *for statements that are not nested*
5th Jun 2017, 5:00 PM
Rrestoring faith
Rrestoring faith - avatar
+ 2
if: You evaluate for example the two variables. When your evaluation is true the execution of the code in {} of the if statement will continue. else: when the none of the statements are true you use else
15th Jun 2017, 9:46 AM
Iwan
Iwan - avatar