toString()

Converts the value to a string representation.

Syntax

String  toString()

Usage

In the string representation, all numbers are displayed as a decimal value. For example, 2.toString() produces "2.0".

If you want a string representation with different formatting, use the format() function.