Answers for "estimate reading time calculator"

0

estimate reading time calculator

function readingTime() {
  const text = document.getElementById("article").innerText;
  const wpm = 225;
  const words = text.trim().split(/\s+/).length;
  const time = Math.ceil(words / wpm);
  document.getElementById("time").innerText = time;
}
readingTime();Code language: JavaScript (javascript)
Posted by: Guest on May-26-2021

Browse Popular Code Answers by Language