Jump to content

Need some help with Javascript arrays


earth4x
 Share

Recommended Posts

Ok here's my problem!!!I have a textarea which I enter some numbers in and then my program transforms those numbers into a javascript arrays, checks some stuff and then gives me back the numbers... then I want to re-insert back into the textarea.. which works fine except I want a \n after every number... so logically I put a table.join command so that after each number there's a \n.. but it just doesn't work!!! chaineNotesValides = tValeursTriees.join("\n"); champNotes.innerHTML = chaineNotesValides;here you can see the 2 things that join the \n and then put the info in the textarea... problem is my numbers come out like so :50 60 70 80 90and if I change \n to let's say % it does this :50%60%70%80%90it works.. but why doesn't it make a \n like i'm asking it to?.. can someone help :/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...