Permalink
Browse files

Add print-score script

  • Loading branch information...
1 parent 2811157 commit 30eeca13cd1151d357920b2cded3e51241121bdd zeus committed Apr 25, 2012
Showing with 5 additions and 3 deletions.
  1. +0 −3 count-von-count/scripts/dump-laps.js
  2. +5 −0 count-von-count/scripts/print-score.js
@@ -1,3 +0,0 @@
-db.teams.find().forEach(function(team) {
- print(team.name + ": " + team.laps);
-});
@@ -0,0 +1,5 @@
+var i = 1;
+db.teams.find().sort({'laps': -1}).forEach(function(team) {
+ print(i + '. ' + team.name + ' (' + team.laps + ')');
+ i++;
+});

0 comments on commit 30eeca1

Please sign in to comment.