why if satetment need? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why if satetment need?

31st Aug 2020, 4:49 AM
RADOWN BIN MONIR
RADOWN BIN MONIR - avatar
1 Answer
+ 7
RADOWN BIN MONIR First of all kindly use the tags which relates to the code. Now the use of if statement is used to check a condition and if the condition is true, we run a block of statements (called the if-block), else we process another block of statements (called the else-block). But else isn't "compulsory" Hope this helps🤟
31st Aug 2020, 4:56 AM
Piyush
Piyush - avatar