Skip to content
Design Corner Knowledge Base ← Back to designcorner.co.ke
Knowledge Base

Software and Development

If Statement

Also known as: If

1 min read Updated November 10, 2026

Definition A basic programming instruction that runs code only when a condition is true.

What it is

An if statement is a basic programming instruction that runs certain code only when a condition is true. Many languages also provide else, to handle the false case.

Why it matters for your business

Almost all software logic, from discounts to login checks, depends on conditions like this.

Real-world example

An online checkout uses an if statement to offer free delivery when the cart total passes 5,000 shillings.

Design Corner tip

When briefing developers, state your business rules as clear if-this-then-that sentences to avoid misunderstandings.

Learn more in these guides