if -else statement

i dont understand th if else statement with it block statement please help me .. :))
1
2
3
4
5
6
7
8
if ( //some condition in here is true)
{
  // then do this block of code
}
else
{
  // do this block of code instead
}


What don't you understand about this?
What Moschops said.

Think of it like this,

if 'a' is the same as 'b'
if yes, we do this.
Otherwise, if 'a' is NOT the same as 'b'
we do this.

1
2
3
4
5
6
7
8
if (a == b)
{
        // True
}
else
{
        // False
}
Topic archived. No new replies allowed.