Instead of nesting, combine conditions:
// Nested version
if (age >= 18) {
if (hasTicket) {
enter()
}
}
// Flattened version
if (age >= 18 && hasTicket) {
enter()
}
Flat code is easier to read and debug. Use && to combine conditions that must all be true. Use || for conditions where any can be true.