Write the equivalent script for the following code using for loop without effecting the output:
var count=new Array();
i=0;
do
{
if(i%2 == 0)
count[i]=1;
else
count[i]= i *10;
i=i+1;
}while(i<=5)
var count=new Array()
for(i=0;i<=5;i++)
}