Create an array dynamically in jquery
Hi,I want to create an array using jquery
like
var totals;
totals = [0, 0, 0, 0, 0, 0];
i want to create this dynamically
for example
var k=3
then
totals=[0,0,0] and so on.
my requirement is like this
var k=5
for( k;k<5;k++)
{
}
finally
totals should be
totals[0,0,0,0,0]
how to do this in jquery
Regards
Baiju