A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/javascript-boolean-reference/ below:

JavaScript Boolean Reference - GeeksforGeeks

JavaScript Boolean Reference

Last Updated : 12 Jul, 2025

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 false

Syntax:

Boolean(variable/expression) 

Example: If the operands are equal, the equal to operator == returns true

JavaScript
    console.log(15 == 15)
    console.log(15 == 11)

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.

Constructor Descriptions Boolean() 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 Properties Descriptions constructor Add a new property and methods to all Boolean instances.

JavaScript Boolean Methods: Methods are actions that can be performed on objects.

Instance Methods Descriptions valueOf() Returns the value of boolean object. toString() Returns a string according to the Boolean value.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4