I've been trying hard at this. A jQuery counter function that counts from 0
to 6
continuously in random but no repeat of a number until end of the loop i.e. until the count of the 7th digit in the array. Currently the following code works for me but the numbers repeat. Please help!
function beginTimer() {
if ($('#timer').html().length == 0) {
timer(0) ;
}
}
function timer(i) {
setTimeout("timer(" + (i) + ")", 1000);
$('#timer').html(Math.floor(Math.random() * 6));
}