Last active
May 25, 2016 08:19
-
-
Save drawveloper/2f10e97bc2ed90bb3fc92a964bbe83f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var studentGrades = _.pluck(studentsByClass["A"], 'grades') | |
// [[7.0, 6.9, 8.0], [5.0, 8.7, 3.7]] - not very useful | |
var grades = _.flatten(studentGrades) | |
// [7.0, 6.9, 8.0, 5.0, 8.7, 3.7] | |
average(grades) | |
// 6.55 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment