how to loop through an array of unknown size in JavaScript Posted July 26, 2014 · Edited July 26, 2014 by christys Hi, I trying to write a code for iterating through the array. Array size will be dynamic, that means we don't know how many elements are there internally. So how can I create an array without size. And my array will be a string. var membernames=new Array(); Can I initialize this way? I want to loop through a set of elements whose size is unknown and retrieve all those details into a variable. How can I do this? Please let me know.. Thanks
how to loop through an array of unknown size
in JavaScript
Posted · Edited by christys
Hi,
I trying to write a code for iterating through the array.
Array size will be dynamic, that means we don't know how many elements are there internally.
So how can I create an array without size.
And my array will be a string.
var membernames=new Array();
Can I initialize this way?
I want to loop through a set of elements whose size is unknown and retrieve all those details into a variable.
How can I do this? Please let me know..
Thanks