Hex Core JS
    Preparing search index...

    Function weaveArrays

    • Weaves the elements of the given arrays into a single array. Iterates through the given arrays taking the element at each position, if there is one, and placing that element into the resulting array.

      Parameters

      • ...arrays: any[][]

        The arrays to weave.

      Returns any[]

      weaveArrays([1, 2, 3], [",", ","]);
      // => [1, ",", 2, ",", 3]
      weaveArrays([1, 2, 3], ["a", "b", "c"], ["A", "B"]);
      // => [1, "a", "A", 2, "b", "B", 3, "c"]