Test Cases (0/4)
    • _.groupBy([1.3, 2.1, 2.4, 3.1], function(num){ return Math.floor(num); }) to return {"1":[1.3],"2":[2.1,2.4],"3":[3.1]}

    • _.groupBy([1.3, 2.1, 2.4, 2.6, 3.1], function(num){ return Math.round(num); }) to return {"1":[1.3],"2":[2.1,2.4],"3":[2.6,3.1]}

    • _.countBy([1, 2, 3, 4, 5], function(num) { return num % 2 == 0 ? 'even': 'odd'; }) to return {"odd":3,"even":2}

    • _.countBy([-1,-2, 3, 5, 7], function(num) { return num > 0 ? 'positive': 'negative'; }) to return {"negative":2,"positive":3}

    Output
    Michael
      (0/300)