Is Equal

Compares two arrays for equality, checking if they have the same elements in the same order.

CategoryValidations
AuthorPol Gubau
Since1.0.0
Last Updated2025-03-15
TypeSync
CompatibilityUniversal

Example

  • Input

    isEqual([1, 2, 3], [1, 2, 3])

    Output:

    true

Return

Returns true if the arrays are equal, otherwise false.

Type: boolean

Props

NameTypeDefaultRequiredDescription
array1T[]nullYesThe first array to compare.
array2T[]nullYesThe second array to compare.

Notes

Arrays are considered equal if they have the same length and corresponding elements are identical.

Tags

  • array
  • comparison
  • equality

Related