The only issue i found, and i guess it's the code itself, is if you press start multiple times it takes the imput as many times as you click it, so the timer will go faster and faster because it will add up. I had a separate stopwatch program that was written in different way and that doesn't do that but i needed help to implement the milliseconds. So the video was imense help because i managed to combine both versions and it worked and now it's working without any problems as far as i know. Ty, very much love
@CodingArtist
Жыл бұрын
Yes. I realized that After I published the video. I could do nothing with the video. So I instead fixed the source code on my website. You can check the fixed version of this code on my website.
@monikadesai8251
Жыл бұрын
Helpful tutorial... Thank you🌹
@davidl.1991
2 жыл бұрын
Easy, simple and GENIOUS!!! Thank you very much!!!!!!
@kannder83
3 жыл бұрын
Excelente tutorial. Muchas gracias.
@bayzednotes4593
Жыл бұрын
please explain : int = setInterval( displaytimer, 10) milliseconds += 10 why its ten
@supremecoding632
3 жыл бұрын
Awesome creations 👍
@CodingArtist
3 жыл бұрын
Thank you :)
@bayzednotes4593
Жыл бұрын
why you use ten in this code : int = setInterval( displaytimer, 10) milliseconds += 10 why its ten
@bayzednotes4593
Жыл бұрын
please sir replied this..... why you use 10 on this code please explain : int = setInterval( displaytimer, 10) milliseconds += 10 why its ten
@bayzednotes4593
Жыл бұрын
why you use 10 on this code: please explain : int = setInterval( displaytimer, 10) milliseconds += 10 why its ten
@feisty8
3 жыл бұрын
hi mitali, i just created vanilla js stopwatch but the js code has a significant flaw. each click on start button is adding an interval so multiple callbacks are firing instead of just the one depending on ho many times you pressed it. this leads to an increase in clock speed with each click also each click adds kind of a level so when you press pause button, you've to press it multiple times to finally stop the watch.
@CodingArtist
3 жыл бұрын
Hey Philip thank you for reporting the bug. The bug has now been fixed. I have updated the code on my website. You can download the source code here: codingartistweb.com/2021/02/create-stopwatch-using-vanilla-javascript/
@feisty8
3 жыл бұрын
@@CodingArtist thanks i'll check it out
@rahanajai6467
2 жыл бұрын
Bro I just figured it out yesterday you have to disable the start button after you clicked start and enable it again when you click stop. I know I am replying late but still anyways 😉
int = setInterval( displaytimer, 10) milliseconds += 10 why its ten
@sandeep.slathia
3 жыл бұрын
Amazing !!! 2nd
@riddheshdesai1716
2 жыл бұрын
getting error after cliking twice on the button{if i press start button while alredy timer running ,it adding 2 values and then reset btn stop working}
@muchamadrikyf2562
3 жыл бұрын
beautiful codes
@minzcode
3 жыл бұрын
Great tutorial..!
@ritikbaranwal6652
3 жыл бұрын
Can you please explain why milliseconds increased with 10 and setInterval increasing to 10. Because 1 seconds = 1000 ms.
@ritikbaranwal6652
3 жыл бұрын
If you explain it will be very helpful for me because I am stucked in millisecond part only.
@shreyajha2501
3 жыл бұрын
this helped me a lot, good work
@CodingArtist
3 жыл бұрын
Glad it helped!
@themessifan1785
3 жыл бұрын
um your tutorial worked but for some reason the padding didn't work on the buttons and the actually timer itself
@ganeshponmalar8377
3 жыл бұрын
Solo learn❤️ ..
@dilqdirov2973
2 жыл бұрын
i dont understand ,explain this codes pls😪
@prakashshrestha2460
3 жыл бұрын
but it have one problem if you click start again and again time is not correct plz give me solution
@CodingArtist
3 жыл бұрын
Yes. I have fixed it in the source code. You can download the code from my website. Also let me know if you need any further help.
@Tyrloxxx
3 жыл бұрын
I did the same but not with your strong buttons anyway
@dogvscatfunny9956
Жыл бұрын
Как начинает писать на js сразу становится не чего не понятно, опять бесполезный видос пустая трата времени
@HowISolvedIt
2 жыл бұрын
If only you explained your code
@antoinedupont3284
2 жыл бұрын
problem solved : implemented Start function when I press start on my html window, nothing happens @_@ edit : damn it's because I forgot a dot in front of timerDisplay let timerRef = document.querySelector('.timerDisplay');
@marcelobc2230
Жыл бұрын
reset function in my google chrome document.getElementById('resetTimer').addEventListener('click', () => { clearInterval(int) // [milliseconds,seconds,minutes,hours] = [0,0,0,0] this row must be commented timerRef.innerText = "00 : 00 : 00 : 000 " })
@bayzednotes4593
Жыл бұрын
please explain : int = setInterval( displaytimer, 10) milliseconds += 10 why its ten
@stale_guy
7 ай бұрын
A millisecond is a thousandth of a second, and the setInterval function takes time (in milliseconds) as the second input. The program has it set to display the timer every 10 milliseconds, because that is the minimal time before slowing your computer down.
Пікірлер: 37