This is a small problem we would like you to solve so that we may better understand your coding ability.
We will be looking at your problem-solving ability, code quality, cleanliness, and professionalism.
We would like you to create a web-based ranking system for a darts league. Minimally-outlined html, css, and javascript files have been provided for you.
- After each player takes her/his turn, their name and score is entered into the text input in the format
name, score
. - Clicking
Add to Rankings
parses the contents of the form field and adds the output to the rankings. - The rankings should be appended to
ul#rankings
and formatted to meet the example output below. - Players with the same score are 'tied', and should have the same rank.
- Players can take any number of turns.
The following game should produce the specified output.
Number 6, 1
Cmdr. Adama, 27
John Cavil, 0
Apollo, 20
Gaius Baltar, 20
Starbuck, 42
1. Starbuck, 42 pts
2. Cmdr. Adama, 27 pts
3. Apollo, 20 pts
3. Gaius Baltar, 20 pts
4. Number 6, 1 pt
5. John Cavil, 0 pts
You may use any javascript libraries you require, but none are required. Please do not include library source code in your application-instead use Bower or link to a CDN. jQuery and lodash have been included in the source for you to use if you wish to use them. You will not be penalized for library use.
If you are using a build tool (eg Yeoman, Grunt, etc), please submit the the code as-authored, as well as any compiled production files.
We will test your application in Chrome. Please use code that would work in any modern browser. Don't stress about IE < 10.
- Writing automated tests for your code.
- Creating a pleasing UI.
- Adding the ability to add the results of multiple games at once.
- Submitting your project as a github repo.
- Surprise us!
- more robust unit test