Function toNumber

  • Converts value to a number.

    Parameters

    • value: any

      The value to process.

    Returns number

    Returns the number.

    5.0.0

    [[isInteger]],[[toInteger]],[[isNumber]]

    toNumber(3.2)
    // => 3.2

    toNumber(Number.MIN_VALUE)
    // => 5e-324

    toNumber(Infinity)
    // => Infinity

    toNumber('3.2')
    // => 3.2