let totol = 0; setInterval(() => { let b = Math.floor(Math.random()*10+1); totol += b; console.log(b,totol); }, 10000);