The Problem
I want to test for the presence of an array inside of an array. For example, if my array is this:
let arr = ["all", ['>', 'PSF', 10]]
I want something like this to work:
let segment = ['>', 'PSF', 10]
arr.indexOf(segment) // would be equal to 1, in this case
What actually happens
arr.indexOf(segment) is currently -1, since I believe in JavaScript [] != []
due to the way it checks the array memory location.
At any rate, what would be the recommended way of testing to see if a specific array currently exists within an array? I also tried .includes(), but it seems to work the same way that indexOf works (so it failed).
Any help would be appreciated.