const s = " hello world "; s.trim(); // "hello world" // 中间的空白保留 " a b ".trim(); // "a b" // 各种空白字符都能去 "\n\t hi \r\n".trim(); // "hi"