I’m not necessarily looking for an answer to the challenge, but to understand how I seem to have broken the includes() method.
Following is a link to a codepen where I’m trying to solve the intermediate algorithm scripting Sorted Union challenge.
There is a line towards the end in an else statement that when uncommented seems to break the includes method. With that line I’m trying to manipulate an array that I’m performing the includes method on.
Like I said I’m not looking for a solution to the challenge, if I want to that is easy enough. I want to understand why a method doesn’t work in a particular case.