+ 1
What is Boolean in JavaScript
3 Respostas
+ 2
Boolean is a type of variable.
It's values are either true or false.
Example-
var isOnline = true;
var x = false;
+ 1
It is a logical data type that has 'True' or 'False' as values
0
This is data type, mostly used to make some switch(to turn on and off something)
And to check some condition, like in if/else, js can convert other data types like numbers, strings to boolean values, you will learn more about it in course.