Ich möchte ein Array mit Variablen erstellen und diese Variablen sollten sich nach einer bestimmten Zeit ändern.Hier ist mein Code, wenn jemand eine Idee hat, bitte sag es mir.Array mit variabler Änderung nach der Zeit
var cookieArray = new Array(window.setInterval(myCallback, 2000));
function myCallback() {
cookie1 = Math.floor((Math.random() * 810) + 0);
cookie2 = Math.floor((Math.random() * 810) + 0);
cookie3 = Math.floor((Math.random() * 810) + 0);
cookie4 = Math.floor((Math.random() * 810) + 0);
cookie5 = Math.floor((Math.random() * 810) + 0);
cookie6 = Math.floor((Math.random() * 810) + 0);
cookie7 = Math.floor((Math.random() * 810) + 0);
cookie8 = Math.floor((Math.random() * 810) + 0);
cookie9 = Math.floor((Math.random() * 810) + 0);
cookie10 = Math.floor((Math.random() * 810) + 0);
}
PS: sorry für mein schlechtes englisch, aber ich bin noch Schüler: D
ah ok danke. – Yuto