trim

» JavaScript

trim

문자열 좌우에서 공백을 제거하는 함수

let str = " test ";
let strTrim = str.trim(); // 'test'