30 seconds of codeBack to Home
Groups the elements into two arrays, depending on the provided function's truthiness for each element.
Array.prototype.reduce() to create an array of two arrays.
Array.prototype.push() to add elements for which
true to the first array and elements for which
false to the second one.