← Back to challenges

Count Number of Identical Arrays

JavaScriptHardalgorithmsarrays

Instructions

Create a function that takes four arrays as arguments and returns a count of the total number of identical arrays.

Examples

countIdenticalArrays([0, 0, 0], [0, 1, 2], [0, 0, 0], [2, 1, 0]) ➞ 2

countIdenticalArrays([0, 1, 0], [0, 1, 2], [0, 2, 0], [2, 1, 0]) ➞ 0

countIdenticalArrays([0, 1, 2], [0, 1, 2], [0, 1, 2], [2, 1, 0]) ➞ 3
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.