Writing Clean & Maintainable Code

Why is it important to avoid deeply nested conditionals in JavaScript code?
function processOrder(order) {
  if (order) {
    if (order.items) {
      if (order.items.length > 0) {
        if (order.payment) {
          // Process order
        }
      }
    }
  }
}
Next Question (6/20)