From c2bfaff889b15878d5f4d4b70ed901d5792de930 Mon Sep 17 00:00:00 2001 From: Amogha R Date: Sun, 16 Jun 2024 21:33:09 +0530 Subject: [PATCH] updated --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 2261cbb..cd550cd 100644 --- a/script.js +++ b/script.js @@ -14,7 +14,7 @@ const dif = function(){ document.getElementById('start').addEventListener('click', function(){ cur = Date.now(); interval = setInterval(dif, 1000); - isStopped = true; + isStopped = false; }); @@ -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);