Skip to content

Commit

Permalink
Fixing missing var
Browse files Browse the repository at this point in the history
  • Loading branch information
mdunisch committed Aug 21, 2014
1 parent 8b2ff5f commit 8f42f22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exercises/5_count_the_comments/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ var commentcount = function(comments){
var counted = [];

// Group by article
comments = _.groupBy(comments, 'username');
var comments = _.groupBy(comments, 'username');

_.forEach(comments, function(item){
_.forEach(comments, function(item, name){

counted.push({
username: item[0].username,
username: name,
comment_count: _.size(item)
});
});
Expand Down

0 comments on commit 8f42f22

Please sign in to comment.