반응형 replaceAll()1 [javascript] 특정 문자 제거하기, split(), join(), replaceAll() split() 메서드는 String 객체를 지정한 구분자를 이용하여 여러 개의 문자열로 나눕니다. const str = 'The quick brown fox jumps over the lazy dog.'; const words = str.split(' '); console.log(words[3]); // Expected output: "fox" const chars = str.split(''); console.log(chars[8]); // Expected output: "k" const strCopy = str.split(); console.log(strCopy); // Expected output: Array ["The quick brown fox jumps over the lazy dog."] jo.. 2023. 9. 2. 이전 1 다음 반응형