RadarTrek
Home/Glossary/Conditional
Programming Foundations

Conditional

Code that runs different instructions depending on whether something is true or false.

Reviewed by the RadarTrek editorial team · June 2026

A conditional (an if/else statement) lets a program make decisions: run this block of code if a condition is true, otherwise run that one. Every piece of branching logic in software — show this if logged in, charge this if the cart isn't empty — comes down to a conditional underneath.

Why it matters

  • Conditionals are how software responds differently to different situations instead of always doing the same thing.
  • Almost every bug involving "wrong thing happened" traces back to a conditional that didn't match reality.
  • Reading nested conditionals carefully is a core debugging skill in any language.

Where to learn this

🎓

Conditionals

Think Like a Programmer course

This is the exact lesson that covers this term in depth — with examples, diagrams, and a hands-on exercise.

Related terms

RadarTrek Intel — monthly score updates

We track 40+ tools so you don't have to. Score changes, new tools, and new guides — once a month, no spam.