There will be a lot of new things in this chapter, but it shouldn't be very difficult: after all, in general, everything revolves around a simple idea - true or false?
Until now, we have always dealt only with primitive data types - with numbers and strings. Have you come across the term "primitive" in programming before? If not, I'll explain: "primitive" (they also say "simple") means that this data type is not an object (we'll come back to this point) and does not have built-in methods of work (that is, functions⚙️).
The data type that you will definitely need is called boolean, or boolean. Boolean type always has the value either
true ✅ - true, or
false ❎ - false. And only this way, and nothing else! He is either lying or telling the truth - pan or disappear, the light is on or off, or there is or not. You either did your homework or you didn't. Only two 2️⃣ values are
true ✅ or
Now we will sequentially study all eight comparison operators, but the thing is that as a result of each of them, we do not care
we will always be left with a boolean value - either
true ✅ or
Thanks goes to these wonderful people (emoji key):
🐛 🎨 🖋