All challenges

JavaScript challenge · Frontend

Chunk

Difficulty

easy

Time

~15m

Format

Single

Grading

Auto-graded

#frontend#javascript#typescript#arrays
Mission file // read carefullyeasy

Implement chunk(arr, size) that splits arr into groups of length size (the last group may be shorter).

chunk([1,2,3,4,5], 2) // => [[1,2],[3,4],[5]]

Build with

TypeScriptJavaScript
Hidden test suite
Auto-graded on submit
Start challenge

Sign in to save your progress.