Make an CountUp with Wix Code

Hello, I’m trying to make an CountUp with text and wix code. I see it on Forum :

https://www.wix.com/code/home/forum/community-discussion/countdown-timer-1%3Fpage%3D1%26dl%3D5c02784919a08e007f509aa0

But on this post it’s only to CountDown with a specific Date.
Now i need to setUp a countUp but i try a lot of line of code to find something but nothing work.
Can you help me please ?
And if you know how clear countUp with a button will be the best … :slight_smile:

Thanks

You can use the Countdown example to get started. All you need to do is to count up instead of down.

Hello Yisrael, First i’m proud to speak with you.

I use Countdown example to find good code but i don’t know how count up with your code :


Which line should I change ?

I try for more than 4 hours, my mind will implode …

To be more explicit, I need to countUp from 0 like an StopWatch.
I would like to add onClick button that will start the Counter and another button that will clear Counter

The setInterval() function triggers every second. You can then just display the current date, and it will change each second. Or, you can increment a counter each time the setInterval() function triggers.

Change the interval to whatever interval you want.

I don’t understand how make it and if is it possible to get an StopWatch with this function ? Or do i need to forget this option on my website ?