Until now, the programs you have written run in a straight line.
Each instruction executes one after the other, always in the same order.
This is called a sequence, but a real program needs to make decisions.
It must be able to react differently depending on the situation.
For example, a shopping cart must display free shipping if the total is above a certain amount, or a login form must accept a user only if the password is correct.
To make these decisions, we use logical conditions.
This chapter introduces the fundamental concept of conditions and the logical operators that make them possible.
Read the full transcript.
Create an account to read the whole episode, search across every transcript, and follow the shows you care about.
Until now, the programs you have written run in a straight line.
Each instruction executes one after the other, always in the same order.
This is called a sequence, but a real program needs to make decisions.
It must be able to react differently depending on the situation.
For example, a shopping cart must display free shipping if the total is above a certain amount, or a login form must accept a user only if the password is correct.
To make these decisions, we use logical conditions.
This chapter introduces the fundamental concept of conditions and the logical operators that make them possible.