Boolean is a primitive data type only represents two values true or false, and mostly used with decision making (conditional statements) like if-else, conditional operators and loops.
Example
<script>
let a = 10;
if(a == 10) // returns true
document.write(a);
</script>
In above example == (equalsto) operator checks value of a is 10 or not and returns true or false.