Who can tell me why the timer doesn't work after setting the conditions?

Code:

function setCoin () {

let coins = 999000;
let z = document.getElementById("coinAmount");
let t = setInterval(() => {
  if (coins > 1000000) {
    coins = 1000000;
    clearInterval(t);
  } else {
    let c = Math.floor(Math.random() * 10 );
    coins += c;
    z.innerHTML = coins;
  }
}, 10);

}
Why coins = 1000000; this line of code doesn"t work.
clipboard.png

May.25,2021

let t = setInterval(() => {
  if (coins > 1000000) {
    coins = 1000000;
    clearInterval(t);
  } else {
    let c = Math.floor(Math.random() * 10 );
    coins += c;
  }
  z.innerHTML = coins; //  if 
}, 10);

you just assigned
z.innerHTML = coins;


in js , and the timer ends


.

let coins = 999000;
let z = document.getElementById ('coinAmount');
let t = setInterval (() = > {
if (coins > 1000000) {

coins = 1000000;
clearInterval(t);

} else {

let c = Math.floor(Math.random() * 10 );
coins += c;(c1000000)
z.innerHTML = coins;

}
}, 10);

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b313b8-2bd84.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b313b8-2bd84.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?