"should be pushing" prints to the console, but if I print mapX.length the console only ever prints 1. I have a printErr() in my else statement that never prints.
=== does not perform any type conversion before comparing, where == does.
2 === 2 //true 2 === '2' //false
3 == 3 //true 3 == '3' //true
array.indexOf(value) returns the index at which the value is stored, which is a number, so the explicit === should work as no type conversion is required.
however, I have tried == and there is no change to my problem.