JavaScript Boolean Reference Last Updated : 18 Apr, 2025 Comments Improve Suggest changes Like Article Like Report JavaScript Boolean is a datatype that returns either true or false In JavaScript, a boolean is used as a function to get the value of a variable, object, conditions, expressions, etc in terms of true or falseSyntax:Boolean(variable/expression) Example: If the operands are equal, the equal to operator == returns true JavaScript console.log(15 == 15) console.log(15 == 11) Outputtrue false The complete list of JavaScript Boolean has listed below:JavaScript Boolean Constructor: A constructor gets called when an object is created using the new keyword.ConstructorDescriptionsBoolean()Create Boolean objects or return primitive values of type boolean.JavaScript Boolean Properties: A JavaScript property is a member of an object that associates a key with a value.Instance Property: An instance property is a property that has a new copy for every new instance of the class.Instance PropertiesDescriptionsconstructorAdd a new property and methods to all Boolean instances.JavaScript Boolean Methods: Methods are actions that can be performed on objects.Instance Method: If the method is called on an instance of a boolean then it is called an instance method.Instance MethodsDescriptionsvalueOf()Returns the value of boolean object.toString()Returns a string according to the Boolean value. Comment More infoAdvertise with us Next Article JavaScript Boolean Reference K kartik Follow Improve Article Tags : JavaScript Web Technologies javascript-dataView JavaScript-Boolean Similar Reads JavaScript Boolean To represent logical values, JavaScript uses the Boolean data type, which has two possible values: true or false. These values often result from comparisons or logical operations. Additionally, the Boolean() function can convert other types of values into Boolean, determining their truthy or falsy n 4 min read JavaScript Boolean toString() Method The boolean.toString() method is used to return a string either "true" or "false" depending upon the value of the specified boolean object. Syntax: boolean.toString() Parameter: This method does not accept any parameter. Return Values: It returns a string either "true" or "false" depending upon the 3 min read JavaScript Boolean valueOf() Method The boolean.valueOf() method is used to return a boolean value either "true" or "false" depending upon the value of the specified boolean object. Syntax: boolean.valueOf() Parameter: This method does not accept any parameter. Return value: It returns a boolean value either "true" or "false" dependin 4 min read JavaScript Boolean Constructor Property JavaScript boolean constructor property returns the constructor function for an object. The function which is returned by this property is just the reference to this function, not a Boolean containing the functionâs name The JavaScript number constructor, string constructor, and boolean constructor 1 min read JavaScript Boolean() Constructor The Boolean() constructor in JavaScript is a built-in function that can be used to create a new Boolean object. The Boolean() constructor takes a single argument and returns a Boolean object with a value of true or false depending on the type and value of the argument passed in. Syntax: Boolean(valu 1 min read Like