Utilizor
Contact Us

Nested Conditions

If inside if.

Nested Conditions

You can have if statements inside if statements.

This allows for more complex logic, but can make code harder to read.

Example

if (x > 10) {
  if (x < 20) {
    console.log("Between 10 and 20");
  }
}