{"id":2404,"date":"2026-11-10T08:03:50","date_gmt":"2026-11-10T08:03:50","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=if-statement"},"modified":"2026-11-10T08:03:50","modified_gmt":"2026-11-10T08:03:50","slug":"if-statement","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=if-statement","title":{"rendered":"If Statement"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Almost all software logic, from discounts to login checks, depends on conditions like this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An online checkout uses an if statement to offer free delivery when the cart total passes 5,000 shillings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When briefing developers, state your business rules as clear if-this-then-that sentences to avoid misunderstandings.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A basic programming instruction that runs code only when a condition is true.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[14],"dc_topic":[34],"class_list":["post-2404","dc_term","type-dc_term","status-publish","hentry","dc_letter-i","dc_topic-software-and-development"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/2404\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2404"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=2404"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=2404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}