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

JS Obj Reference

String

prototype