Skip to content

You can cast integers to strings #26

@cD1rtX3

Description

@cD1rtX3
12.toString()

gets tokenized as 12. toString ( ), which is errant. This is not just an issue with the toString function, but rather with every member of numbers. (JavaScript only has two numeric types, and "integer" is not one of them.)

You can prove this by writing:

12 .toString()

which gets tokenized as 12 . toString ( ), and thus returns 12, an integer, as a string.

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