Is Equal
Compares two arrays for equality, checking if they have the same elements in the same order.
Category | Validations |
Author | Pol Gubau |
Since | 1.0.0 |
Last Updated | 2025-03-15 |
Type | Sync |
Compatibility | Universal |
Example
Input
isEqual([1, 2, 3], [1, 2, 3])
Output:
true
Return
Returns true if the arrays are equal, otherwise false.
Type: boolean
Props
Name | Type | Default | Required | Description |
---|---|---|---|---|
array1 | T[] | null | Yes | The first array to compare. |
array2 | T[] | null | Yes | The second array to compare. |
Notes
Arrays are considered equal if they have the same length and corresponding elements are identical.
Tags
- array
- comparison
- equality