trim
앞뒤 공백을 제거합니다.
str.trim()
아래 값을 입력하면 예제에 즉시 반영됩니다.
const
console
const text = " hello world "; console.log(text.trim()); // "hello world"