Calculates the negation of all the elements of an array.

  • Parameters

    • arr: number[]

      The array

    Returns number[]