Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

#replaceWordsInPage This is a coding assignment I supplied for an employer. It demonstrates:

  • Screen-scraping of Wikipedia pages
  • Word-counting
  • Sorting
  • Replacing text in an HTML page
  • Definition of rules for counting words
  • The Module pattern
  • Promises
  • CSS selectors
  • jQuery coding

The solution can also be found at this jsFiddle.

###Assignment Objective:

To create an algorithm written in JavaScript that replaces the top 25 most common words based on their frequency with the their count inline. Your code should be pasteable and runnable in the browser console.


  • Page to process and run your code on:
  • A word may not include HTML tags, JavaScript code, numbers, spaces or punctuation.
  • A word may notbe from the top 100 common words in english and you may not hardcode these into the source code
  • Also please remove common words “are”, “is”, “where”, “was” and any single characters
  • You may use JQuery and standard JavaScript but no other third party library
  • Your code should be runnable on recent Chrome or Firefox browser.


  1. Open Chrome and navigate to your html file on disk.
  2. The page should update to look like the image below. It is okay if your counts are off by a few. Smaller icon


This is a jQuery coding sample I wrote on request. It screen-scrapes some Wikipedia pages, and then replaces content on one of the pages with word count information.



No releases published
You can’t perform that action at this time.