Conditionals
Lesson 1 of 1
1. 1
We make decisions in everyday life based on conditions. If we’re tired, we might take a rest. If we’re thirsty, we would find something to drink. If we’re hungry, we grab something to eat. And if …
2. 2
As we previously mentioned, we do things based on our present conditions. Like, if we’re hungry, we’d get something to eat; if it’s raining, we would carry an umbrella. How our actions follow the…
3. 3
Imagine a scenario where we’re thirsty and want to drink some lemonade. But it turns out all the lemonade was sold out. If we followed our original plan exactly, we wouldn’t get anything. But it’s …
4. 4
Let’s now expand the use of our conditionals to account for other types like: 🔤, or 🔢, or 💯! But there’s a question of, “how do we convert the types 🔤,🔢, and 💯 to 👌 values?” Well, that’s where the …
5. 5
In addition to 🙌 operator, Emojicode also offers other comparison operators to expand our use cases! Here’s a list of the comparison operators: Operator | Operation — | — ◀️ | Less than ▶️ | Gr…
6. 6
So far we’ve only been able to check a single condition in our ↪️/🙅 statements. But, we actually check more conditions by using the 🙅↪️ statement. Like the ↪️ that starts our conditionals, the 🙅↪️ acc…
7. 7
Consider the making of hard-boiled 🥚. We need both: boiling water and an egg. If even one ingredient is missing, we can’t make it. So we should check for both conditions before we flex our culinary…
8. 8
Another helpful logical operator is the 👐 operator. The 👐 operator also checks two expressions and returns a 👌 value. The major difference is that the 👐 operator returns 👍 so long as a single expr…
9. 9
In Math class, we might have been asked to solve equations like: 2 * 6 + 10 / 2 If we read out our equation from left to right we might think that the answer is 11. However, it’s actually 17 be…
10. 10
Great job getting through Emojicode’s conditionals! In this lesson we went over: * The ↪️ statement accepts a condition and executes a code block if the condition is 👍. * The 🙅 statement provides a…

## What you'll create

Portfolio projects that showcase your new skills

## How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory