| || |
Can we declare a variable as array size?
Please can any one tell me whether we can use a variable as array size?
is the above example possible?
or do i need to mention the specific number while declaring array instead of variable.
Re: Can we declare a variable as array size?
If you're using JScript, you can declare an array like this:
var StringArray=new Array(10);
But you don't have to declare how many elements are in the array, because JScript arrays are sparse arrays. You can get more information about that here: