javascript split string by character into array