Why doesn't array splice work with a string that has been formatted into an array using the split()
method?
function _formatText(text) {
var textList = text.replace(/\s+/g, ",").split(",");
return textList.splice(1, 0, "<br />").join(" ");
}
alert(_formatText("A REALLY LONG STRING"))