{"ScriptPreparationCode":"var arr = [];\r\n\r\nfor (i = 0; i \u003C 1000; i\u002B\u002B) {\r\n arr[i] = i;\r\n}","TestCases":[{"Name":"Lodash","Code":"var [met, rest] = _.partition(arr, function(i) { return i % 2 === 0 });","IsDeferred":false},{"Name":"Native reduce","Code":"function partition(array, predicate) { const length = array.length; const truthy = new Array(length); const falsy = new Array(length); let truthyIndex = 0; let falsyIndex = 0; for (let i = 0; i \u003C length; i\u002B\u002B) { const item = array[i]; if (predicate(item, i, array)) { truthy[truthyIndex\u002B\u002B] = item; } else { falsy[falsyIndex\u002B\u002B] = item; } } truthy.length = truthyIndex; falsy.length = falsyIndex; return [truthy, falsy];} var [met, rest] = partition(arr, function(i) { return i % 2 === 0 });","IsDeferred":false}]}