padEnd()1 [javascript]padStart() / padEnd() padStart() / padEnd() padStart()/padEnd() 메서드는 주어진 길이에 맞게 앞/뒤 문자열을 채우고, 새로운 문자열을 반환합니다. "문자열".padStart(길이) "문자열".padStart(길이, 문자열) const str1 = "456"; const currentStr1 = str1.padStart(1, "0"); const currentStr2 = str1.padStart(2, "0"); const currentStr3 = str1.padStart(3, "0"); const currentStr4 = str1.padStart(4, "0"); const currentStr5 = str1.padStart(5, "0"); const currentStr6 = str1.padStar.. 2022. 8. 17. 이전 1 다음 728x90