Skip to content

transfer a value to boolean #1390

@MAYDAY1993

Description

@MAYDAY1993

I'm wondering why using !! is best and Boolean() is good but new Boolean is bad,can you provide some references or some pratice to help me understand this rule? I know that using new Boolean can new an object and we can other methods to this object ,etc.Thank you for answering
https://github.com/airbnb/javascript#coercion--booleans

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions