concat
The concat() method combines the text of multiple strings and returns a new string.
Interactive example
Syntax
Classic signature
typescript
function concat(
input: string,
...textsRest: string[]
): stringCurried signature
typescript
function concat<
GenericInput extends string
>(
text: string
): (input: GenericInput) => stringParameters
input: The base string.textsRest: One or more strings to concatenate withinput.
Return value
A new string containing the combined text of the provided strings.
See also
repeat- Repeats a string a given number of timespadStart- Pads the string at the startpadEnd- Pads the string at the end
