# If statement

## Syntax

```javascript
if condition {
    // statements
}
```

## Else

```javascript
if false {
    // do some A
} else {
    // do some B
}
```

## Nested if-else

```javascript
if a {
    // do something
} else if b {
    // do something
} else if c {
    // do something
}
```

Please remember two if-statements below are the same.

```javascript
if a {
} else if b {
} else {
}

if a {
} else {
    if b {
    } else {
    }
}
```
