Conditional Logic to Enable or Disable Questions
You may use absolutely the same expression to enable/disable questions as use in visibleIf properties. The only difference, the property clearInvisibleValues doesn't work here, since a question stays visible.
Please review examples of using visibleIf in this section: "Complex questions in expressions", "Use custom functions in expressions" and "Conditions in dynamic questions"