JavaScript: String.prototype.trimEnd
New in JS2019.
str.trimEnd()
-
same as
trimRight
str.trimRight()
- Return a new string with whitespaces on the right removed. [see Whitespace Characters]
console.log( "t ".trimEnd () === "t" ); // true console.log( "t ".trimRight () === "t" ); // true