Hi Community,
I have an dynamic array like this below:
Arr1:[Hello,world,its,me]
Number of items in this array can change as this is getting created by a string var which do not a fix length. String could be anything (For eg: Its me again, Hi there how are you etc)
As per my requirement, I need to to first five to six items from the array if array size is bigger than that. I am using array index to concatenate like this:
Var1=Arr1(0)+" "+Arr1(1)
I am having a concern that via this way Var1 creation is not dynamic since it could be possible to run out of index. For Eg: If array had only 1 item then Var1 assign would fail.
Please suggest some way to make this thing more dynamic.
Thank you!