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
JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

String

prototype