Why var is important: Variables are how we store data in memory. Variables give us the ability to keep track of all of the data for our application. Variables are nouns. They are how we define the things that we work with in our code.
Related terms: let, const
Definition: A conditional statement is of the if-then format, and allows an application to decide between one or more courses of action, based on whether a particular condition is true. Conditional statements use what is called boolean logic to determine what to do. Boolean logic is based on looking at if a statement is true, or if it is false. We use this all the time in our everyday world. “If it is raining, take an umbrella,” is an example of a conditional statement.
Why it is important: A conditional statement is the primary tool used by programming languages to make logical decisions. Without oversimplifying, this is the workhorse of every application and every decision that an application makes.
Definition: A loop is a structure in code where you perform the same action or actions multiple times in a row.
Why it is important: In code, you are always dealing with sets of data, or sets of actions that need to be performed. Think of a deck of cards. That is a set of 52 individual “things” (cards), that would need to be dealt out. The action of going one by one through the cards and dealing each one to the next player is a loop. You are repeating the dealing action 52 times.
Related terms: for, forEach
Why it is important: The data structures represented by an object quite often model something in the real world. Let’s take the idea of a User for instance. A User would have a number of properties, such as e-mail address, username, password, and whether or not they are an administrator. I probably would have a function to reset my user’s password, as an example. A player in a game would have a score, a number of lives, etc. If I were a restaurant, I might have customers and transactions as the types of objects I need to represent in my code.
Don Burks is head instructor at Lighthouse Labs’ Vancouver campus. He started coding as a kid and has a background in software development and entrepreneurship. Before Lighthouse Labs he was CTO and co-founder at Nickler. When he’s not teaching, he’s working on two side project startups.
Everything you need to know about linear algebra, calculus, probability, and statistics!
We compare curricula, costs, time commitment, and more at these two online learn-to-code resources!
Our guide to choosing between Dataquest and Datacamp – two self-paced, online data science classes.