반응형 filter()1 [javascript] 배열에 숫자 갯수 세기, join(), split(), filter() join() 메서드는 배열의 모든 요소를 연결해 하나의 문자열로 만듭니다. const elements = ['Fire', 'Air', 'Water']; console.log(elements.join()); // Expected output: "Fire,Air,Water" console.log(elements.join('')); // Expected output: "FireAirWater" console.log(elements.join('-')); // Expected output: "Fire-Air-Water" split() 메서드는 String 객체를 지정한 구분자를 이용하여 여러 개의 문자열로 나눕니다. const str = 'The quick brown fox jumps over the lazy d.. 2023. 8. 31. 이전 1 다음 반응형