SAP Cloud SDK for JavaScript - v4.1.1
    Preparing search index...

    Function splitInChunks

    • Split the given array in chunks.

      Type Parameters

      • T

      Parameters

      • arr: T[]

        Array to be split into chunks.

      • chunkSize: number

        Size of the chunks.

      Returns T[][]

      Two dimensional array with arrays of length chunkSize. The last subarray could be shorter.

      Copyright Ⓒ 2025 SAP SE or an SAP affiliate company. All rights reserved.