Conditionals
Learn the fundamentals of conditionals in Emojicode!
StartConditionals
Lesson 1 of 1
- 1We 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 …
- 2As 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…
- 3Imagine 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 …
- 4Let’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 …
- 5In 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…
- 6So 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…
- 7Consider 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…
- 8Another 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…
- 9In 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…
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