Skip to content

2.3 数值 一章 中 5.2 parseFloat 一节 的错误 #246

@yuu2lee4

Description

@yuu2lee4

该节中有以下描述错误:
如果参数不是字符串,或者字符串的第一个字符不能转化为浮点数,则返回NaN

这里应该行为跟parseInt一样,参数不是字符串,会先隐式转换为字符串,所以parseFloat([123]) 不会返回NaN

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