Returns true if all values in iterables are equal, regardless of their position. Uses === equality semantics by default.
Is NOT recursive.
Optional
const a = ['apples','oranges','pears'];const b = ['pears','oranges','apples'];hasEqualValues(a, b); // True Copy
const a = ['apples','oranges','pears'];const b = ['pears','oranges','apples'];hasEqualValues(a, b); // True
const a = [ { name: 'John' }];const b = [ { name: 'John' }];// False, since object identies are differenthasEqualValues(a, b); // True, since now we're comparing by valuehasEqualValues(a, b, (aa,bb) => aa.name === bb.name); Copy
const a = [ { name: 'John' }];const b = [ { name: 'John' }];// False, since object identies are differenthasEqualValues(a, b); // True, since now we're comparing by valuehasEqualValues(a, b, (aa,bb) => aa.name === bb.name);
Returns true if all values in iterables are equal, regardless of their position. Uses === equality semantics by default.
Is NOT recursive.