JavaScript: String.prototype.trimEnd

By Xah Lee. Date: . Last updated: .

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
BUY
ΣJS
JavaScript in Depth

JS Obj Reference

String

prototype