Standard built-ins
Boolean() conversion
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
| Name | Type | Description |
|---|---|---|
| value | any | Value whose truthiness is evaluated. |
Return Value
boolean
Boolean interpretation of value.
Working Example
Example Snippetjavascript
console.log(Boolean("no"));console.log(Boolean(0));