loop through array

Custom encoding

TheBlind
7 years ago | edited 7 years ago

0

HI,
when I loop through the array trying to insert each sub array in the textarea, it only returns the last sub array and not the whole sub arrays i.e.
var a = $(“textarea”)[0].value.split(“,”);
for (i = 0; i < a.length; i++) {

$(“textarea”)[1].value = a[ i ]

Is someone happy to give me an hand ?
thks

5replies
2voices
210views
? [bolofecal]
7 years ago | edited 7 years ago

1

You can use += or join the array.

TheBlind
7 years ago

0

thks I try this…

? [bolofecal]
7 years ago

0

You’re welcome.

TheBlind
7 years ago

0

I’ve finished it off!
thks again!

? [bolofecal]
7 years ago

0

Congrats. ****

You must be logged in to reply to this discussion. Login
1 of 6

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss