Concatenating strings
The concat
method creates a new string by concatenating the given strings to the target string. This is equivalent to using the +
operator to join strings in order.
Loading TypeScript...
Notice that the original string is not modified. In JavaScript, if the arguments to concat
are not strings, they are converted to strings before joining. TypeScript enforces a type of string
on the arguments to concat
.