Determines if two variables are both arrays and equal.

Parameters:
NameTypeDescription
aArray

First variable to be compared.

bArray

Second variable to be compared.

Since
  • 1.0.0
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 );
}