I’m running into an extremely strange bug that I’ve no idea where to begin remotely approaching the solution.
The setup is simple. The function checks if an array contains a certain item
and then loops through the item to find where is it in.
Now here’s where it went wrong:
- How could it passed the ‘Contain’ condition and YET could not find the item in the loop
- On checking, how did it pass the contain condition when the array is empty ?
- I’ve a loop outside of this function. On the next iteration how did it passed the contain condition AGAIN despite the array being empty.