Whats ia a condition | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Whats ia a condition

How to use it

19th Mar 2019, 8:42 PM
Musa Paul
Musa Paul - avatar
2 Answers
+ 9
A condition is where something happens if something else is true. For example: if(3 > 2) { alert(7); } The 3 > 2 is the condition, and the alert(7); is the code to be executed if the statement is true. Any code that will run when the statement is true should go in the curly braces (`{` and `}`).
19th Mar 2019, 8:47 PM
Rowsej
Rowsej - avatar
+ 1
Thank man
19th Mar 2019, 8:49 PM
Musa Paul
Musa Paul - avatar