dimanche 1 novembre 2015

Lotto generator javascript

Hallo by lotto generator code I got some numbers double in one "generate" cycle. This is the code:

function lottery() {
    for (var i=0; i<=7; i++) {
        var lottery = Math.floor(Math.random() * 49);
        document.getElementById ("lotto" + i).innerHTML = lottery;
    }
}

Who knows where is the problem? Thank You!




Aucun commentaire:

Enregistrer un commentaire