Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 457 Bytes

README.md

File metadata and controls

11 lines (9 loc) · 457 Bytes

One to Multi

Build a function that sorts an array into a multidimensional array grouped by data type

  • Write a function that takes one parameter
    • Parameter 1 - An array of anything
  • The function should output a multidimensional array grouped by data type
  • Example:
    • var myArray = ['hello', 34, true, false, 'goodbye', 56, 12, '25', true];
    • groupArray(myArray);
    • Output - [['hello, 'goodbye', '25'], [34, 56, 12], [true, false, true]]