How does parseInt() in Javascript work?

后端 未结 4 1532
挽巷
挽巷 2021-01-28 12:25



        
4条回答
  •  臣服心动
    2021-01-28 13:09

    From Microsoft's docs:

    If no prefix of numString can be successfully parsed into an integer, NaN(not a number) is returned.

    So yes, only parsable prefixes are returned.

提交回复
热议问题