I developed a clock, and I need a loop that returns "s" at every second
There is only one function in my program
I am lost in creating this loop, can you guys help me?
I developed a clock, and I need a loop that returns "s" at every second
There is only one function in my program
I am lost in creating this loop, can you guys help me?
You can use setInterval :
setInterval(() => {
// your code
}, 1000); // 1000ms = 1second
You can read the documentation here