let array = [
"",
"Hello",
"house",
"Velocity",
"orange",
"Gray",
"Intellegence",
];
let arr = function () {
out.innerHTML = array[random];
};
let r = function () {
setInterval(arr, 1000);
};
button.addEventListener("click", () => {
r();
});
;
после объявления функций.let words = [
"",
"Hello",
"house",
"Velocity",
"orange",
"Gray",
"Intellegence",
];
let SetRandomWord = function () {
let random
do {
Math.floor(Math.random()*3);
while (random >= words.length);
out.innerHTML = words[random];
}
let MakeInterval = function () {
setInterval(SetRandomWord, 1000);
}
button.addEventListener("click", MakeInterval);