티스토리 뷰

string.split( separator, limit ) 

문자열 데이터를 반복적으로 하나씩 꺼내 이용할 수 있는 배열로 만들기 위해 이용

separator에 분할기준을 넣음 ','

text.split(',');

 

 developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split

 

String.prototype.split() - JavaScript | MDN

The split() method divides a String into an ordered list of substrings, puts these substrings into an array, and returns the array.  The division is done by searching for a pattern; where the pattern is provided as the first parameter in the method's call

developer.mozilla.org

 

'개발' 카테고리의 다른 글

TIL: MYSQL 실행문제 해결과 테이블 칼럼 조회(초간단)  (0) 2021.08.14
TIL : 객체지향과 this , 생활코딩  (0) 2021.03.03
TIL : URL, HTTP  (0) 2021.02.28
TIL : pug 기본 사용법  (0) 2020.12.30
TIL : MVC 패턴과 모듈화  (0) 2020.12.28
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함