Determines if two variables are both arrays and equal.
Parameters:
Name | Type | Description |
---|---|---|
a | Array | First variable to be compared. |
b | Array | Second variable to be compared. |
- Since
- 1.0.0
- Source
Returns:
Returns true if both variables are arrays and are equal. Returns false otherwise.
- Type:
- boolean
Example
import { arrayEquals } from "@gravityforms/utils";
function Example() {
const ary1 = ['a', 'b', 'c'];
const ary2 = ['a', 'b', 'c'];
const isEqual = arrayEquals( ary1, ary2 );
}