Skip to content

Boolean("false") parses to true #531

@tuhlmann

Description

@tuhlmann

In section "21.6 Booleans" you advice to use Boolean(x) to parse a value into a boolean.
Please note that parsing mostly any String results in true:

Boolean("false")
=> true

null, undefined and "" parse to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions