Reference char()

char()

Converts a Number or String to a single-character String.

char() converts numbers to their single-character string representations.

The parameter, n, is the value to convert. If a number is passed, as in char(65), the corresponding single-character string is returned. If a string is passed, as in char('65'), the string is converted to an integer (whole number) and the corresponding single-character string is returned. If an array is passed, as in char([65, 66, 67]), an array of single-character strings is returned.

See MDN for more information about conversions.

Examples

Syntax

char(n)
char(ns)

Parameters

n
String|Number:

value to convert.

ns
Array:

values to convert.

Returns

String: converted single-character string.
This page is generated from the comments in src/utilities/conversion.js . Please feel free to edit it and submit a pull request!

Related References