trim1 trim() trim() | trimStart() | trimEnd() trim() : 앞뒤 문자열 공백제거 trimStart() : 앞 공백 제거 trimEnd() : 뒤 공백 제거 //01 const str1 = " javascript "; const currentStr1 = str1.trim(); document.querySelector(".sample03_N1").innerHTML = "1"; document.querySelector(".sample03_Q1").innerHTML = " javascript "; document.querySelector(".sample03_M1").innerHTML = "trim()"; document.querySelector(".sample03_P1").innerHTML = .. 2022. 8. 17. 이전 1 다음 728x90 반응형