I have 2 input boxes so I enter a "From" and "To" values in each. For some reason it works in with a certain range only, but can't figure out why.
var from = $('#from').val();
var to = $('#to').val();
var total = '';
for (i = from; i <= to; i++)
{
if (i == to)
total += i;
else
total += i + ',';
}
console.log(total);
so this works when doing something like 1-10 but I've tried 8-30 or 8-100 doesn't work...can't seem to figure out why..