Sign in

An all-expenses-paid trip to loops in programming

Let’s start off with the basics. What is a loop?

Complex: A loop is a structure of code that repeats every line of its loop body a set amount of times based upon its conditional statement. (Whew..)

Simple: A loop in programming repeats some code over and over again, a set amount of times.

Structure of a Loop

Now that we know a basic definition, we must now build upon the definition with some vocabulary. Let’s learn the structure of a loop! In its simplest form, this is all a loop is:

Conditional Statement (Checks whether or not we should loop)

{

Loop Body (The code that…

Noah Ripke

Programmer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store