Create a Typing Practice Game with JavaScript | JS PROJECT
HTML-код
- Опубликовано: 6 фев 2025
- Finished codes: github.com/0sh...
In this video, we are going to create a typing practice game with javascript from scratch. We will only be using pure vanilla js, no library or plugin. So this will be a really informative video. I hope you will learn something new from it.
If you like the video don't forget to subscribe and share the video with your friends 😄
Support me on Patreon: / 0shuvo0
Follow me on Twitter: / 0shuvo0
Read my articles on Dev: dev.to/0shuvo0
#javascript #js #game #dev
how calculate wpm??
you can simply use a setTime out lets say in every 100ms you run a function in that function you can calculate WPM:
let elapsedTime = 0
setTimeout(() =>{
if(elapsedTime > 1000){
let wordCount = Array.from(document.querySelectorAll(".text span")).length
console.log((elapsedTime / 1000) / wordCount + "WPS")
console.log((elapsedTime / (1000 * 60)) / wordCount + "WPM")
}
elapsedTime += 100
},100)
how to change timeout
Hey guy! I started to study coding about one month. Do you mind if I try to create something similar to practice? I really enjoyed it! Congratulations!
Sure
Best of luck
1st
I am really grateful for your constant support brother
subcribes for this useful video!
Many many THANKS