Skip to content

Latest commit

 

History

History
67 lines (63 loc) · 1.99 KB

README.md

File metadata and controls

67 lines (63 loc) · 1.99 KB

Project: Timer

The project is centered on the design and implementation of a timer for educational purpose.

Table of Contents

General Info

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.

Screenshots

timer_img

Technologies

Project is created with:

  • HTML5
  • CSS3
  • JS ES6

Status

Project is: done

Code Examples

// 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";
}

Features

List of features ready and TODOs for future development

  • 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

To-do list:

everything is done

Contributing

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

License

MIT License: Copyright (c) 2018 Martyna Zyskowska

Author

Martyna Zyskowska