>>780

function f() {
const ary = ["あ","い","うう"]
let i = 1;

const timer_id = setInterval(function () {
// 0〜配列の要素数未満の乱数を発生させて、少数点以下を切り捨てる。つまり、0〜2
idx = Math.floor(Math.random() * ary.length)
console.log(i, ary[idx]);
i++;

// 指定回数でタイマーを解除する
if (i > 5) { clearInterval(timer_id); }
}, 1000);
}

f()