Check if an Array Is Within a 2D Array Using JavaScript
Solving pass-by-reference with an algorithm
Published in
5 min readMar 9, 2020
At some point, you’ve probably run across the issue of comparing arrays with one another. Due to pass-by-reference, we can’t simply check if [1,2,3]
is the same as [1,2,3]
.
This was an issue for me when I was trying to solve a Leetcode problem where the goal was to get all…