Boolean is a datatype that returns either of two values i.e. true or false . In JavaScript, Boolean is used as a function to get the value of a variable, object, conditions, expressions, etc. in terms of true or false.
Read moreIs Boolean 1 True or false?
Boolean values and operations Constant true is 1 and constant false is 0. It is considered good practice, though, to write true and false in your program for boolean values rather than 1 and 0.
Read more