I have the below code inside a function
document.getElementById('textFromUser').innerHTML = value;
document.getElementById("displayForward").value=stackforward+"\n"
valCurrent = value;
The “displayForward” is a textarea. Array items displayed in that textarea need to be seperated by a break (create a column rather than row with commas).
The page has a user input box where the user enters values (letters or numbers). Then the values get pushed to a stack and displayed in that textarea as outputs. Now the problem is that they are displayed in one row like this: v,w,x,y,z….i.e. my code still displays items in a row seperated by commas.
Whether what I need to do is to get them displayed in a column format without commas:
v
w
x
y
z
Going round in circles with this, could somebody help me fix the above please?
I can see that you had a mis-spelling in there too which I have corrected.
Try the below:
hope that helps