0

What is the difference between if , else if and else *why the code doesn't run?

https://code.sololearn.com/c04u3Jg3ehl4/?ref=app

25th Jul 2017, 10:29 PM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
3 Answers
+ 2
You have written esle if instead of else if. The if statement use to make a condition, the else if use to make a condition if the if condition is not allowed and the else statement use to execute code if no condition is allowed
25th Jul 2017, 10:42 PM
Ī‘Ī·Ļ„ĪæĪ¹Ļ€e
Ī‘Ī·Ļ„ĪæĪ¹Ļ€e - avatar
0
cool thanks it's crystal clear now but I've heard before about nested if how if can come inside of another if statement?
26th Jul 2017, 6:53 AM
Hmmam Babe khuoja
Hmmam Babe khuoja - avatar
0
Yes if can be inside an other if. You can also pass multiple conditions to the if statement
26th Jul 2017, 12:17 PM
Ī‘Ī·Ļ„ĪæĪ¹Ļ€e
Ī‘Ī·Ļ„ĪæĪ¹Ļ€e - avatar