Languages
[Edit]
EN

TypeScript - 1 minute countdown timer

0 points
Created by:
Mahir-Bright
1281

In this article, we would like to show you how to create a one-minute countdown timer in TypeScript.

Practical example

Edit

In the example below, we use setTimeout() method to execute a function once the timer expires.

As setTimeout() arguments we pass:

  1. makeIteration() function that prints seconds and clears the console from the previous iteration,
  2. 1000 milliseconds to make setTimeout() count every second. 

See also

Edit
  1. JavaScript - 1 minute countdown timer

  2. Dirask Snippets - js for loop with settimeout() example

References

Edit
  1. setTimeout() - Web APIs | MDN

Alternative titles

  1. TypeScript - one minute countdown timer
  2. TypeScript - 60 seconds countdown timer
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join