Converts a value to a number
将值转换为数字
The value to convert. 要转换的值
The converted number, or NaN if conversion is not possible. 转换后的数字,如果无法转换则返回 NaN
toNumber('42') // => 42toNumber('hello') // => NaNtoNumber(undefined) // => NaN Copy
toNumber('42') // => 42toNumber('hello') // => NaNtoNumber(undefined) // => NaN
Converts a value to a number
将值转换为数字