An improved isNumeric() function?

前端 未结 7 1573
轮回少年
轮回少年 2021-02-01 14:00

During some projects I have needed to validate some data and be as certain as possible that it is javascript numerical value that can be used in mathematical operations.

7条回答
  •  清酒与你
    2021-02-01 14:35

    isNaN function used to check the value is a numeric or not. If the values is numeric its return true else returned false.

    code:

     
    

提交回复
热议问题