Skip to content

Some values (like undefined) should have a reserved keywords (like null) #25

@DavidBruant

Description

@DavidBruant

Some names (like undefined and NaN) can be used as identifiers making it hard to use them 100% reliably as values (which is what people expect naturally). This leads people to write things like typeof x === "undefined" while they could just be writing x === undefined, or use void 0 etc.

List of things that shouldn't be allowed as identifiers:

  • undefined
  • NaN
  • Infinity

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