Hex Core JS
    Preparing search index...

    Function replaceArrayElement

    • Returns a new array with the element at the specified index replaced with the new given element.

      Type Parameters

      • T

      Parameters

      • array: T[]

        The array to replace the element within.

      • index: number

        The index of the element to replace.

      • element: T

        The element to replace the original with.

      Returns T[]