splitEvery([1, 2, 3, 4, 5], 2) // β [[1, 2], [3, 4], [5]]splitEvery partitions an array into sub-arrays of a given size, with the last possibly shorter.
Challenge: Implement splitEvery<T>(n: number, arr: T[]): T[][] splitting an array into chunks of size n.
splitEvery(2, [1,2,3,4,5]) // β [[1,2],[3,4],[5]]