Carrot reference
Functions

formatNumber()

Converts a given value of type Number into a String.

Syntax

formatNumber(number[, format][, locale])

  • number - the Number value to be converted to a String.
  • format -
  • locale -
  • Return type: String

Sample usage

formatNumber(20) returns 20 as a String.

Supported data types

Input type

Return type

Logic

Number

String

If a Number value is passed, it's value will returned as a String.

Unsupported data types

Null

Unsupported data types return Null.