parseDouble()

Convert the calling string to a Double.

Signature

parseDouble(): Double | Null

Description

The parseDouble() method converts the calling string to a numeric Double.

  • Leading and trailing whitespace are allowed.

  • Exponential notation is allowed.

  • Comma separators aren’t allowed.

The calling string isn’t changed.

Parameters

None

Return value

One of:

Type Description

Double

Value parsed from the calling string.

Null

Unable to parse calling String.

Math.Infinity

A String indicating a value greater than a Double can hold.

Examples

  1. Convert a simple numeric value:

    "2147483647".parseDouble()
    2147483647
  2. Convert a value represented in exponential notation:

    "1.7976931348623158e308".parseDouble()
     1.7976931348623157e+308

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!