Learning to chunk an array with JavaScript
Instructions
Given the array and chunk size, divide the array into multiple subarrays where each is of similar length
//EXAMPLES
chunk([1, 2, 3, 4], 2) --> [[ 1, 2], [3, 4]]
chunk([1, 2, 3, 4, 5], 2) --> [[ 1, 2], [3, 4], [5]]
chunk([1, 2, 3, 4, 5, 6...
delvoid.hashnode.dev2 min read