A browser-based typing test that measures words per minute and accuracy. Great for practising timers, string comparison, and dynamic DOM updates.
Follow these steps in order. Each one builds on the previous.
Store a list of sample passages
Display a random passage in the UI
Listen for keypress events in the input field
Start the timer on the first keypress
Compare typed characters to the passage character by character
Highlight correct characters green and errors red
Stop the timer when the passage is complete
Calculate and display WPM and accuracy
Loading...