{"ScriptPreparationCode":"var arrays = [[1, 2, 3, 4, 5], [5, 2, 10]];\r\n\r\nfunction chunk(input, size) {\r\n return input.reduce((arr, item, idx) =\u003E {\r\n return idx % size === 0\r\n ? [...arr, [item]]\r\n : [...arr.slice(0, -1), [...arr.slice(-1)[0], item]];\r\n }, []);\r\n};","TestCases":[{"Name":"Lodash","Code":"_.chunk([\u0027a\u0027, \u0027b\u0027, \u0027c\u0027, \u0027d\u0027], 3);","IsDeferred":false},{"Name":"Native","Code":"chunk([\u0027a\u0027, \u0027b\u0027, \u0027c\u0027, \u0027d\u0027], 3);\r\n","IsDeferred":false}]}