Hey guys,
So this bit of error is confusing the heck out of me. For whatever reason, the for loop is not exiting after the loop condition is met:
![alt text][1]
Notice the last 3 lines in the console, the loop is suppose to end after "Skipping: i: 1 j:1", but i just go back down to 0 and j goes out of range.
Here is the code:
![alt text][2]
Maybe I'm approaching this the wrong way, but the idea of this loop is to go through every array in the list "matchList" to find arrays that share the same object and if they share the same object, it'll first single out the object, and remove one of them from one of the array, and merge the two arrays into one, then remove the two old arrays. Once it has done that, It'll run the function again to find if there are more duplicates. [Here is what I'm trying to do][3].
Essentially, if there are two or more 5+ matches, it'll merge each 5+ matches into a single array rather then having two separate array. (also in the video, arrays are not merging)
The entire merging and removing duplicates of the array are working find, its just for whatever reason, this loop is not exiting out of the loop condition :C
Any help would be appreciated >3<
[1]: https://puu.sh/xJRVl/b0706b75f2.png
[2]: https://puu.sh/xJRTe/459fd7bd2d.png
[3]: https://drive.google.com/file/d/0BwRaqMJK9iiIVlBndG5mWXBJWmM/view
↧