How To Create A Stopwatch Using JavaScript | Make Stopwatch With HTML, CSS And JavaScript

Sdílet
Vložit
  • čas přidán 28. 08. 2024
  • Learn How To Create A Stopwatch Using JavaScript | Make Stopwatch With HTML, CSS And JavaScript
    #HTMLandCSS #JavaScript #JavaScriptProject
    ❤️ SUBSCRIBE: goo.gl/tTFmPb
    In this tutorial we will make a JavaScript Mini project to create a Stopwatch. You can add this JavaScript project in your portfolio or job resume. In this JavaScript stopwatch we will display the timer and there will be 3 buttons to control this stopwatch timer. We can Start, Stop and Reset the timer in this Stopwatch. These functionality will be created using JavaScript and the front end design of this stopwatch is made using HTML and CSS.
    Download Image: drive.google.c...
    -----------------------------------------
    Suggested Course:
    ❤️ Complete website Using HTML and CSS
    ✔️ 8 Complete website step by step
    ✔️ Source Code Download
    ✔️ 76 Lectures, 12 Hours Video
    ✔️ Course Completion certificate
    👉 easytutorialsp...
    -------------------------------------
    Recommended Videos:
    Learn Complete HTML and CSS from basics:
    ► • HTML And CSS Tutorial ...
    Make A Complete Website for college using HTML & CSS:
    ► • How To Make A College ...
    How to make a Business website step by step:
    ► • How To Make Website Us...
    How to make personal resume website step by step:
    ► • How To Make A Website ...
    How to make fitness website design using HTML CSS:
    ► • How To Make A Website ...
    How to make an Ecommerce Website Design:
    ► • How To Make eCommerce ...
    How to make a Job Portal website design with HTML & CSS:
    ► • How To Make Website Us...
    How to make travel website design with HTML CSS Bootstrap:
    ► • How To Make A Website ...
    -------------------------------------
    Affordable web hosting (coupon- EASYTUTORIALS)
    👉 easytutorialsp...
    My recommended tools and tutorials
    👉 easytutorialsp...
    -------------------------------------
    ◼️ Source code link is shared in community post for all my coding videos exclusively for channel members (only channel members can see)
    Join Channel Membership:
    ► / @greatstackdev
    -------------------------------------
    Images Credit:
    unsplash.com/
    -------------------------------------
    Like - Follow & Subscribe us:
    ◼️ CZcams: goo.gl/tTFmPb
    ◼️ Facebook: goo.gl/qv7tEQ
    ◼️ Twitter: / itsavinashkr
    ◼️ Instagram: / iamavinashkr

Komentáře • 118

  • @leandrohenrique6056
    @leandrohenrique6056 Před rokem +13

    I'm Brazilian, and your videos are the best.

  • @albina272
    @albina272 Před rokem +5

    Thank you this was an awesome video and a great idea for a project! I followed your steps and created my own version! :)
    Request: Could you please do a part at the end of each project guiding us on how to make it responsive?
    Thank you very much!

    • @GreatStackDev
      @GreatStackDev  Před rokem +5

      Thank you for your comment, All videos has different purpose, this video was for making stop watch using JavaScript. I don't want to make my video in long duration. You can learn the responsive concept in my other videos. Please check: czcams.com/video/0YFrGy_mzjY/video.html

  • @shubhammaurya3309
    @shubhammaurya3309 Před 3 měsíci +1

    Thank you so much sir... Phle mai khud se bnane ki kosish kar reha tha mgr logic ban hi nhi reha tha... Ab smjh aa gya

    • @GreatStackDev
      @GreatStackDev  Před 3 měsíci

      You're welcome. Thank you. 😊 Keep making more projects!

  • @talkingnpc
    @talkingnpc Před rokem +3

    Needed a stopwatch for an exercise, this great tutorial helped me a lot, thanks!

  • @cristianferreira3350
    @cristianferreira3350 Před rokem +2

    Happy New Year!!! thank you for all you do for us! god bless you!

  • @chargeff06
    @chargeff06 Před 18 dny +1

    15:20 Another way to add zeroes is by creating a single function which will work for every variable
    dislpayTime.innerHTML = ` ${paddedZeroes(hours)} : ${paddedZeroes(minutes)} : ${paddedZeroes(seconds)}`;
    function paddedZeroes(number){
    return (number < 10 ? "0" + "") + number;
    }

  • @Gopal8055
    @Gopal8055 Před rokem +1

    Sir i watch all your videos which is so helpful for me

    • @GreatStackDev
      @GreatStackDev  Před rokem

      Thanks Gopal, glad you liked this tutorial to make stopwatch using javascript

  • @dennisdarko3197
    @dennisdarko3197 Před rokem +1

    I am really impressed with you presentation sir

    • @GreatStackDev
      @GreatStackDev  Před rokem

      Thanks a lot, Glad you liked this tutorial to make stopwatch using javascript

  • @user-fn4sz9nj4k
    @user-fn4sz9nj4k Před 5 měsíci

    I have been following your videos and all of the videos are so much help full keep going 😁

  • @dadi_vlogs3254
    @dadi_vlogs3254 Před 9 měsíci +1

    HI man, lots of thanks for what you offer here.
    I have a question bro : what is the purpose of using this condition :
    if(timer !== null) {
    clearInterval(timer);
    };

  • @konstantinreut2577
    @konstantinreut2577 Před 9 měsíci

    I am thankful to you for your lessons.

  • @salwacoding5661
    @salwacoding5661 Před 7 měsíci

    Thank you vary helpful toturial.

  • @mayankcharan1688
    @mayankcharan1688 Před rokem

    Loved your work you have done fantastic job .very easy to understand concept.well done ❤❤

  • @TahaBolat-sn6ib
    @TahaBolat-sn6ib Před rokem +2

    Thank you for this video it is amazing!! But i've come to an issue that when you click start button it wasn't restarting so i figured out this issue with adding timer = null after clearInterval(timer) function. Because the timer wasn't null after clearInterval() function so i couldn't setInterval() again. If anyone has this issue this is the solution. Also dont forget to add timer = null after every clearInterval() function :)

  • @mahmodsamir5110
    @mahmodsamir5110 Před rokem

    best and simple explanation ever

  • @quantyquanty3724
    @quantyquanty3724 Před rokem

    Happy New Year. Looking forward to an interesting and creative one. Much has been said about ChatGPT but I am sure this channel with last. God Bless.

  • @nodiramatchanova1493
    @nodiramatchanova1493 Před rokem

    your tutorials helps me a lot

  • @HD-op1pe
    @HD-op1pe Před rokem

    Thank you so much for this. Exactly what I needed.

  • @zeeshanahmad789
    @zeeshanahmad789 Před rokem

    Simple and good explanations.
    Easy to understand.
    Awesome 👍🏻

    • @GreatStackDev
      @GreatStackDev  Před rokem

      Thanks Zeeshan, glad you liked this tutorial to make Stopwatch using JavaScript

  • @telmafarida7642
    @telmafarida7642 Před 9 měsíci

    Hello, love the video it is simple and easy to comprehend. I however have an issue with the start button, when clicked more than once the function executes again making it execute after every 500 milliseconds. This now prevents the timer from being null so all other buttons do not work. Please offer some guidance.

  • @akSingh_120
    @akSingh_120 Před 5 měsíci

    nice concept. I liked it ..

  • @CHIKKUGAMER-su1bx
    @CHIKKUGAMER-su1bx Před 6 měsíci

    Great one sir, nice explanation

  • @isamsvideoediting4572
    @isamsvideoediting4572 Před rokem +2

    Hello Avinash, Can you please make a detailed tutorial only on CSS

  • @abkyerima
    @abkyerima Před rokem

    God bless you sir

  • @lukekoletsios3236
    @lukekoletsios3236 Před rokem

    thank for you for the video! Very helpful sir.

  • @SahilKumar-yx2ev
    @SahilKumar-yx2ev Před 3 měsíci

    thanks man god bless you always keep it up

  • @saadlasharii
    @saadlasharii Před 8 dny

    Not given that how does the play button changes into pause button and then back into play button when the start or stop the timer??

  • @abelreddy257
    @abelreddy257 Před rokem

    Great video. I was wondering why do we have to use timer variable.

  • @ghadykeyrouz1116
    @ghadykeyrouz1116 Před 6 měsíci

    Thank you!

  • @mahimapandey1195
    @mahimapandey1195 Před rokem +1

    very good explanation! please make more complicated javascript projects as well

    • @GreatStackDev
      @GreatStackDev  Před rokem

      here is the best 30 JavaScript project, you will love it: czcams.com/play/PLjwm_8O3suyOgDS_Z8AWbbq3zpCmR-WE9.html

  • @gocusayadin
    @gocusayadin Před rokem

    Cool project!

  • @user-tl3os5ro5k
    @user-tl3os5ro5k Před 11 měsíci

    Thanks!
    it Helped

  • @patty_d.4773
    @patty_d.4773 Před rokem

    Thank you so much!

  • @vikisneakers
    @vikisneakers Před 11 měsíci

    Learnt alot, thanks man

  • @21avinashsrivastava10
    @21avinashsrivastava10 Před rokem +3

    This code is not working 😕

  • @iamuzzalhossen
    @iamuzzalhossen Před 3 měsíci

    thanks a lot!

  • @ashishkabirpanthi5540
    @ashishkabirpanthi5540 Před 9 měsíci +1

    ❤❤❤

  • @govindsharma973
    @govindsharma973 Před 8 měsíci

    Bro you are awesome❤❤ thanks yrr

  • @Vkvk-y3u
    @Vkvk-y3u Před 2 měsíci

    Clearinterval in watch star functuon when timer is not null how its work can you explain this on. Because clearinterval stop the time which one used in watchstop function also.

  • @arjun_mavnoor
    @arjun_mavnoor Před 10 měsíci

    Thank You

  • @abubakerhaider
    @abubakerhaider Před 10 měsíci +1

    please someone clarify why he set the variable timer to null and why he used it in watchStart function
    if(timer !== null){
    clearInterval(timer);
    }

    • @harshkochar2345
      @harshkochar2345 Před 6 měsíci

      there is an Alternative for that

    • @harshkochar2345
      @harshkochar2345 Před 6 měsíci

      function watchStart() {
      if (timer == null || timer.paused) {
      timer = setInterval(stopwatch, 1000);
      }
      }

    • @LinesofLove
      @LinesofLove Před 4 měsíci

      This code ensures that if a timer interval has been set previously (meaning timer is not null), it will be cleared to avoid any potential conflicts or unintended behavior.

  • @adityadhanani828
    @adityadhanani828 Před rokem

    Amazing it works

  • @marceloquiroga9052
    @marceloquiroga9052 Před 11 měsíci

    great Tutorial!!!!

  • @tehniyatansari1614
    @tehniyatansari1614 Před 10 měsíci

    Very helpful

  • @shivanshagrawal3285
    @shivanshagrawal3285 Před 13 dny

    I don't know why but the "onlick" isn't working in this one so i tried adding event listener and it worked

  • @ArfaYounus186
    @ArfaYounus186 Před rokem

    thank you sir

  • @petermwansa4890
    @petermwansa4890 Před 7 měsíci

    Thank you

  • @raven.4815
    @raven.4815 Před rokem +1

    Hi man, this was pretty useful to a project of mine, but I have a doubt, what is the meaning of "let [seconds, minutes, hours] = [0,0,0]", does it create 3 different arrays? Thx!

  • @users9722
    @users9722 Před rokem

    yeah but the setInterval function fires immediately not after you click the start button

  • @gknomics
    @gknomics Před rokem

    hey man i have a little issue that when I start the watch it says undefined

  • @thenameisraju1052
    @thenameisraju1052 Před rokem +1

    Please create calculator video with using javascript

    • @GreatStackDev
      @GreatStackDev  Před rokem

      here it is: czcams.com/video/cGgLHJGyS34/video.html

  • @naturesmusic1171
    @naturesmusic1171 Před rokem

    Could microseconds be added ?

    • @GreatStackDev
      @GreatStackDev  Před rokem +1

      in settimeinterval add 0.001 that will count at 1 microsecond. then desirably other value also in H1
      hours : minutes : seconds : milliseconds : microseconds

  • @Ghulammustafa-wg6cy
    @Ghulammustafa-wg6cy Před rokem

    Thanks Sir
    love from Pakistan

  • @Amman_vellore_angalammanthunai

    Hi bro I am Indian create website upload to localhost to webhosting open phone not view full screen what append bro

  • @nirushetty5530
    @nirushetty5530 Před rokem

    👏👏

  • @singh.aditya11
    @singh.aditya11 Před rokem

    Hey Avinash, Please Give me this StopWatch Full Code.

  • @Allinone-ew4df
    @Allinone-ew4df Před rokem

    Hello Avinash Sir,
    I am Arpit and i am getting a probelem in this vedio at the time 02:02 you said that you will close the browser and open it with VSCode extention but i didn't understand that thing and when i thought that i will refresh the browser manually so it was not working .
    So could you please help me that how could you do that thing i watch all your vedios and in all your vedios i get same probelem .
    So please help me

    • @RhythmRift74
      @RhythmRift74 Před rokem

      just throw the folder into vs code and turn on live sever

    • @Allinone-ew4df
      @Allinone-ew4df Před rokem

      I tried that also but i dont know how to throw the browser aand when i am right clicking so the live server option is also not coming

    • @GreatStackDev
      @GreatStackDev  Před rokem +1

      Hi Arpit, Just search for "VS Code live server" on CZcams and watch any video, you will understand it

    • @Allinone-ew4df
      @Allinone-ew4df Před rokem

      Ok thanks

  • @dickson710
    @dickson710 Před rokem

    but the time is not really ticking every 1 second.

  • @jamesross5120
    @jamesross5120 Před rokem

    I dont understand how you can remember everything to do with javascript its really hard to remember what goes where and how functionality works.

    • @GreatStackDev
      @GreatStackDev  Před rokem +2

      I also don't remember everything, sometimes i have search too. But by creating some small project like this you will remember the common features

  • @simthatweek
    @simthatweek Před rokem

    8:20 js

  • @hiwotina26
    @hiwotina26 Před rokem

    Doesn't the hour have infinite counting?

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @allanbranson4693
    @allanbranson4693 Před 13 dny

    any ones else timer displaying three digits instead of two?

  • @firaasantar4503
    @firaasantar4503 Před rokem

    Quit being a CZcams your bad at it I fell asleep 3 times trying to follow this tutorial.

  • @itwithaydin9000
    @itwithaydin9000 Před rokem

    can you share code here?

    • @GreatStackDev
      @GreatStackDev  Před rokem +2

      Sorry, I can't put the code link in public, People just download it and close the video without watching it, Then what's the use of making video tutorials, if you really want to learn please watch the video then try to make it yourself, if you get any issue you can email me [avinashdm@outlook.com]

  • @user-rt7ql9di7l
    @user-rt7ql9di7l Před 6 měsíci

    3.Feb.24

  • @richardgideon4959
    @richardgideon4959 Před rokem

    WTF!?

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss

  • @Top5WithRhyme
    @Top5WithRhyme Před rokem

    How to create search engine plss