Boolean 1/4
What are Booleans Values
The boolean data type is either true
or false
. In programming, we often need to know if an expression (code snippet which evaluates to some value) is true
or false
so in that case, we use boolean values. In JavaScript, boolean variables are defined by the true
and false
keywords.
9
1
2
let isClear = true;
console.log(isClear);
12let isClear = true; console.log(isClear);
Task
Swipe to start coding
Declare a variable isEarthFlat
and assign the value false
to it. Display the value on the console.
Solution
9
1
2
let isEarthFlat = false;
console.log(isEarthFlat);
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 15
single
9
1
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat