true
if a
and b
have the same elements in the same order, false
otherwise
Check if 2 Set
s have the same elements.
Strict equality (===
) is used to compare elements.
Time complexity: O(n)
Space complexity: O(1)
true
if a
and b
have the same elements, false
otherwise
Check if 2 Map
s have the same key-value pairs.
Strict equality (===
) is used to compare values.
Time complexity: O(n)
Space complexity: O(1)
true
if a
and b
have the key-value pairs, false
otherwise
Check if 2 arrays have the same elements in the same order. Strict equality (
===
) is used to compare elements.Time complexity: O(n)
Space complexity: O(1)