counter.js
// Returns the existing count from the title (defaults to 0)
Returns the existing count from the title (defaults to 0)
Returns the existing count from the title ( defaults to 0 )
function existingCount() {
  const title = document.title;
  const indexOfCount = title.indexOf(" (");
  return title.substring(indexOfCount + 2, title.length - 1) || 0
}
function existingCount ( ) { const title = document . title ; const indexOfCount = title . indexOf ( " (" ) ; return title . substring ( indexOfCount + 2 , title . length - 1 ) || 0 }
Returns the existing count from the title (defaults to 0)
Returns the existing count from the title ( defaults to 0 )