Remove spaces with replace() using a regular expression: let text = " Hello World! "; ... The trim() method removes whitespace from both sides of a string.
確定! 回上一頁