JavaScript: String.prototype.trim

By Xah Lee. Date: . Last updated: .
str.trim()
Return a new string with begin/end whitespaces removed. [see Whitespace Characters]
console.log( "   ab\n".trim () === "ab" ); // true
JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

String

prototype