var _ =require('underscore');var list =["Sam","Joe","Julie","Aleen"]//Example 1. invoke groupBy method to get grouped list by lengthvar result = _.groupBy(list,'length');
console.log(result);
list =[1.3,1.2,1.5,2.4,2.3,2.5]//Example 2. invoke groupBy method to get grouped list of number
result = _.groupBy(list,function(num){returnMath.floor(num);})
console.log(result)