Skip to main content

isDifferentArray

Checks if two given arrays are different.

function isDifferentArray(a: unknown[], b: unknown[]): boolean;

Examples

isDifferentArray([1, 2, 3], [1, 2, 3]); // false
isDifferentArray([1, 2, 3], [1]); // true
const foo = { foo: 'bar' };
const bar = { bar: 'foo' };

isDifferentArray([foo, bar], [foo, bar]); // false
isDifferentArray([foo, bar], [{ foo: 'bar' }, { bar: 'foo' }]); // true