trimEnd
The trimEnd() method removes whitespace at the end of a string. Whitespace includes spaces, tabs, line breaks, and other Unicode whitespace characters.
Interactive example
Syntax
typescript
function trimEnd<
GenericInput extends string
>(input: GenericInput): stringParameters
input: The string from which to remove trailing whitespace.
Return value
A new string representing the calling string without trailing whitespace.
