JavaScript: String.prototype.trim
str.trim()
-
Return a new string with begin/end whitespaces removed. [see Whitespace Characters]
const xx = ` ab `; console.log(xx.trim() === "ab");
str.trim()
Return a new string with begin/end whitespaces removed. [see Whitespace Characters]
const xx = ` ab `; console.log(xx.trim() === "ab");