Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
El temporizador de conteo no funciona (parte setInterval)

Noté que la parte setInterval hace que el código no funcione. No se muestra ningún error. Funciona cuando presiono manualmente el botón uno a la vez.

 const stopWatch = document.getElementById("time"); let totalSecs = 0; const start = document.getElementById("start"); let timeCount = setInterval(seconds, 1000); let seconds = () => { start.innerHTML = "Clicked!"; ++totalSecs; let hr = Math.floor(totalSecs / 3600); let min = Math.floor(totalSecs / 60); let sec = totalSecs - hr * 3600 - min * 60; stopWatch.innerHTML = `${hr} : ${min} : ${sec}`; } document.addEventListener("click", seconds);
 <div id="time"> </div> <button id="start">Start</button>

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!