didn't find the solution in SPLIT function.. i was trying to convert a string into array.. String is like.
My name-- is ery and your-- is this i just want to convert that string to array, and then print it out but while getting this '-- ' break the line too.
i have did that so far
function listToAray(fullString, separator) { var fullArray = []; if (fullString !== undefined) { if (fullString.indexOf(separator) == -1) { fullAray.push(fullString); } else { fullArray = fullString.split(separator); } } return fullArray; } but is for Comma separated words in string, but what i want is to just convert string to array and then print it out while breaking line on getiing '-- ' this is array Thanks in advance