The project is centered on the design and implementation of a timer for educational purpose.
The timer project goal is to check how quickly the user will reqrite provided text. The end result is to show the exact time used to rewrite the text.
Project is created with:
- HTML5
- CSS3
- JS ES6
Project is: done
// Start the timer:
function start() {
let textEnteredLength = testArea.value.length;
if (textEnteredLength === 0 && !timerRunning) {
timerRunning = true;
interval = setInterval(runTimer, 10);
}
console.log(textEnteredLength);
}
// Reset everything:
function reset() {
clearInterval(interval);
interval = null;
timer = [0,0,0,0];
timerRunning = false;
testArea.value = "";
theTimer.innerHTML = "00:00:00";
testWrapper.style.borderColor = "grey";
}
- The timer starts when the input is provided
- The timer stops when the whole text has been rewritten
- If there is a wrong letter provided the box will light on red color
- If the text was rewritten correctly the box will light on green color
- When the user press "Start over" button the page will reset the clock and field of text
everything is done
Contributions to the project library are welcome. Please note the following guidelines before submitting your pull request:
- Follow JS coding standards
- Write tests for new functions and added featues
MIT License: Copyright (c) 2018 Martyna Zyskowska
Martyna Zyskowska