Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

string.toString()

Get a String representation of the value.

Signature

toString() => String

Description

Returns a String representation of the calling value. If the calling value is a String, it returns the calling String. The calling String isn’t changed.

Parameters

None

Return value

Type Description

String

String representation of the calling String.

Examples

Confirm that the calling string type returns itself:

'foobar'.toString()
"foobar"

Get the String representation of a Time() value:

let t1 = Time.fromString("2099-10-20T21:15:09.890729Z")
t1.toString()
"2099-10-20T21:15:09.890729Z"

Get the String representation of a floating point number:

1.5.toString()
"1.5"

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!