//I'm downloading a button from the page const buttomRandomOne = document.getElementById("randomOne"); const buttomRandomSix = document.getElementById("randomSix"); const resetButton = document.getElementById("reset"); //Create arrays const result = [] //Function random once number const randomOne = function() { if (result.length === 6) { return alert("Wszystkie"); }; const div = document.createElement("div"); //Create element const score = Math.floor (Math.random() * 49 + 1); for (let i = 0; i < result.length; i++) { if (score === result[i]) { return randomOne(); } } div.textContent = score; //Value of the content document.body.appendChild(div); //Add element result.push(score); } // Function random six numbers const randomSix = function() { for (i=0; i<=6; i++) { randomOne; } } //Function reload const functionReload = function() { location.reload(); } buttomRandomOne.addEventListener("click",randomOne); resetButton.addEventListener("click",functionReload); buttomRandomSix.addEventListener("click",randomSix);