Skip to main content

True or False?

@serverSerrverlesskiy

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βš™οΈ).

True

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 false.

Equality operators#

Operator

Boolean values come in handy when we need to compare something in JavaScript. When the need arises, we immediately call the comparison operators. 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 false ❎.

Payment#

Now you are on a stripped-down version of the site, after subscribing to Patreon, you will get full access to the training course, as well as access to our server's private channels in Discord.

Download our mobile application or get tested in our JavaScript telegram bot, and also subscribe to our news.

Become a Patron!

Sumerian school

Contributors ✨#

Thanks goes to these wonderful people (emoji key):


Dmitriy Vasilev

πŸ“–πŸ’΅

Resoner2005

πŸ› 🎨 πŸ–‹

Become a Patron!