Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghar29 committed Jun 16, 2024
1 parent 01f64a3 commit c2bfaff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const dif = function(){
document.getElementById('start').addEventListener('click', function(){
cur = Date.now();
interval = setInterval(dif, 1000);
isStopped = true;
isStopped = false;

});

Expand All @@ -32,7 +32,7 @@ document.getElementById('reset').addEventListener('click', function(){

});
document.getElementById('lapse').addEventListener('click', function(){
if (!isPaused || !isPaused){
if (!isPaused && !isStopped){
const element1 = document.createElement('div');
element1.innerHTML = (Date.now() - cur) / 1000;
document.getElementById('display').appendChild(element1);
Expand Down

0 comments on commit c2bfaff

Please sign in to comment.