Member-only story

Coding 101: The IF, ELSE IF, and ELSE statements EXPLAINED-The Test Lead

The Test Lead
5 min readDec 13, 2020

--

When you are first getting introduced to the world of coding it may seem overwhelming. It is essential to understand the basics first, and then you could build on them. One of the core functionalities in programming that is used throughout every object-oriented programming language is the “If” statement.

This article will:

  • Define what the if statement is
  • Breakdown the structure of the if statement
  • Show the different comparisons that can be used in an if statement
  • Show how it is used in code
Photo by Zan on Unsplash

What is an if statement?

An if statement is a conditional statement in code that tells your program what to do with certain pieces of information. In English, computers are not smart enough to think fully for themselves, yet. An if statement lets your program make decisions while it is running. You will predefine statements and checks that if your program meets the criteria for while it is executing, it will then carry out certain tasks.

If statement showed in diagram form

What is the structure of an if…

--

--

The Test Lead
The Test Lead

Written by The Test Lead

Lead SDET at fintech company in NYC. Visit personal page http://thetestinglead.com// Twitter @juss_bailey Youtube @The Test Lead

No responses yet