I have a piece of code that looks like this
The output will contain a literal \n instead of a line break which is not really the desired output. What would be a way to insert the line breaks to get the desired output?Code:for (var k=0; k<myArray.length; k++) { minuslen = myArray.length-1; myString += myArray[k]; if (k<minuslen) { myString += " : "+myArray[k+1]; } myString += "\n"; k++; } myArray = myString.split(" : ");



Reply With Quote



Bookmarks