I have called serialize on array
inputColl.serialize();
How to loop to it and print values?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
cpharmston and cletus have solid approaches. I’ll offer a plain JavaScript approach and an approach you should not use:
How to loop through an array using plain ol’ JavaScript:
Don’t confuse the loop above with this one:
The JavaScript for/in statement loops through an object’s properties. This is a very different operation than looping through an array’s contents, but it is a common mistake to make. This is especially common if you use languages like C# and are expecting behavior similar to its foreach construct.