iggs-utils - v2.4.0
    Preparing search index...

    Function arrayDifferences

    • Compute the element-wise absolute differences between two arrays of numbers.

      Parameters

      • a1: number[] = []

        array to compare

      • a2: number[] = []

        array to compare

      Returns number[]

      return the array difference a1-a2

       arrayDifferences([1,2,3],[3,2,1]); // [2,0,2]