[JS] 공백 정규식, split 등..

[JS] 공백 정규식, split 등..

1

2

3

4

5

"1,2,3".split(',') // ["1", "2", "3"]

"1, 2, 3".split(',') // ["1", " 2", " 3"]

"1, 2, 3".split(/\s*,\s/) // ["1", "2", "3"]

from http://lecafecreme.tistory.com/85 by ccl(A) rewrite - 2021-09-14 12:01:15