<p>Write code that enhances all arrays such that you can call the <code>array.groupBy(fn)</code> method on any array and it will return a <strong>grouped</strong> version of the array.</p>
<p>A <strong>grouped</strong> array is an object where each key is the output of <code>fn(arr[i])</code> and each value is an array containing all items in the original array with that key.</p>
<p>The provided callback <code>fn</code> will accept an item in the array and return a string key.</p>
<p>The order of each value list should be the order the items appear in the array. Any order of keys is acceptable.</p>
<p>Please solve it without lodash's <code>_.groupBy</code> function.</p>