format

Replaces each format item in a specified string with the text equivalent of a corresponding object's value. Uses toString for every format item.

Parameters

format StringThe format string.

ReturnsString The formatted string.

Example

<script>
console.log(kendo.format("{0} - {1}", 12, 24));  // outputs "12 - 24"
console.log(kendo.format("{0:c} - {1:c}", 12, 24)); // outputs "$12.00 - $24.00"
</script>

See Also

Supported number formats

In this article
Not finding the help you need? Improve this article