open_in_new
content_copy
var str = " a b c d e f g "; var newStr = str.trim(); // "a b c d e f g"