I have the following code in a function:
foo += document.getElementById("faa").value; foo += String("\n");
And this is what it displays:
stuff stuff stuff
When I want it to display:
What am I doing wrong?
Are you outputting the result to HTML as plaintext? If so, you might wanna concatenate a <br /> tag instead.
hi! I would suggest using “\r\n” when you're concatenating,
foo += document.getElementById("faa").value; foo += String("\r\n");
if you found this helpful, mark it as the correct answer.