Ae
Dr

Coding Basics - If... Then... Else....

Basic

No matter the programming language, you always need a way to select between executing two different sections of code, depending on some condition. These are called conditionals, and they are what breathe dynamic life into our programming. Here we look at the most common type of conditional, IF… THEN… ELSE…

If/Then/Else is a conditional that lets us ask some question, and depending on if it resolves to be true or false, we can make a section of code be executed. There’s a number of ways If/Then/Else can be written, but despite the syntax, it always works the same way.

In this series the basis of our examples are off two different programming languages, PHP and Javascript, but the principles can often apply to any other programming language.

SUPPORT MEDIA WORKBENCH ON PATREON FOR EXCLUSIVE DOWNLOADS

Grab some Merch

Express your inner creative outwardly whilst supporting all that we do...

View Merch store

Need some help

Run into an issue with one of the tutorials or is something not covered in the FAQ?

Contact and Support