diff --git a/snippets/countBy.md b/snippets/countBy.md index 4ec176e69..31a5d2ae3 100644 --- a/snippets/countBy.md +++ b/snippets/countBy.md @@ -19,4 +19,5 @@ const countBy = (arr, fn) => ```js countBy([6.1, 4.2, 6.3], Math.floor); // {4: 1, 6: 2} countBy(['one', 'two', 'three'], 'length'); // {3: 2, 5: 1} -``` \ No newline at end of file +countBy([{ count: 5 }, { count: 10 }, { count: 5 }], item => item.count) // {5: 2, 10: 1} +```