function Hoho() { alert('Привет'); } setTimeout(Hoho, 1000);
function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } async function Tutor() { fakt=new Array("matn1","matn2","matn3","matn4","matn5"); r=Math.floor(Math.random()*5); document.write(fakt[r]); await sleep(86400); } } Tutor()