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