What is if-statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
7th Apr 2018, 10:20 AM
Hari om meena
Hari om meena - avatar
3 Answers
7th Apr 2018, 1:27 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 3
if and else are pretty much as they appear. If(1==1){ do this } else{ else do this } If the information in the ( ) is true, then the code inside the if brackets will run. if the information is false, for example if(1==2) then it will skip that code block and instead run the else block
7th Apr 2018, 11:25 AM
LordHill
LordHill - avatar