Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/pomodoro-timer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function updateTimer() {
}

function startTimer() {
startEl.disabled = true;
interval = setInterval(() => {
timeLeft--;
updateTimer();
Expand All @@ -29,9 +30,12 @@ function startTimer() {
}, 1000);
}
function stopTimer() {
startEl.disabled = false;
clearInterval(interval);

}
function resetTimer() {
startEl.disabled = false;
clearInterval(interval);
timeLeft = 1500;
updateTimer();
Expand Down