README for the problem
Implementation in JavaScript from the psedu-code
removed the function call; the program will be called from a index.html file
Added a test case
Runs the program and also runs the tests
added assertion messages