Skip to content

behaviour of + operator depends on types of operands #22

@michaelficarra

Description

@michaelficarra

+ can mean either addition or string concatenation depending on its operands. And if neither operand is a literal (a + b), it becomes a chore to figure out which behaviour is being denoted. In the most extreme cases, one can't even statically determine this. This leads to accidental addition being a common bug even among experienced ECMAScripters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions