Standard built-ins

Boolean() conversion

Try the free JavaScript compiler

Called without new, Boolean returns the truthiness of its argument as a primitive. An omitted argument gives false. Do not use it to parse the spelling of Boolean words. Calling with new creates a wrapper object, which is not the primitive result.

Formal Syntax & Structure

javascript syntaxjavascript
Boolean(value)

Parameters & Attributes

NameTypeDescription
valueanyValue whose truthiness is evaluated.

Return Value

boolean

Boolean interpretation of value.

Working Example

Example Snippetjavascript
console.log(Boolean("no"));console.log(Boolean(0));
JavaScript Reference