How to get the number of elements in an array? I mean array size.

kutvaram
Tera Expert

Hi All,

I am using arrayName.length to get the number of elements in an array.

But result not seems right.

What is the best way to get the count of the array elements?

Is there anyother method?

Thanks & Regards,

Ram Prakash

6 REPLIES 6

Hi Saurav,

 

Tried your suggestion but its not working.

 

Any other way to fetch it?

 

Thanks & Regards,
Ram Prakash

kutvaram
Tera Expert

var version = [];
version ='list collector variable name';
var rightBucket= gel(version+'_select_1');
var selectedOptions=rightBucket.options;

var test=newValue.split(',');
var value=test;

for(var i=0;i<value.length;i++)
{

 

This way we can achieve the functionality. It works.