//I'm downloading a button from the page const button = document.querySelector("button"); //Create arrays const result = [] //Random function const random = function() { if (result.length === 6) return; 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 random(); } } div.textContent = score; //Value of the content document.body.appendChild(div); //Add element result.push(score); } button.addEventListener("click",random); //Waiting for a button click