We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be22426 commit c231307Copy full SHA for c231307
easy/chunk-array.js
@@ -0,0 +1,7 @@
1
+const chunk = (arr, size) => {
2
+ let result = [];
3
+ for (let i = 0; i < arr.length; i += size) {
4
+ result.push(arr.slice(i, i + size));
5
+ }
6
+ return result;
7
+};
0 commit comments