Code not working atm

Code not working atm
0.0 0

#1

Any reason why if (counter === 4) { window.clearInterval(window.interval)} works and
if (counter === array.length) { window.clearInterval(window.interval)} doesn’t work?

These are both number types… I don’t get it.


#2

=== checks for data type also. Are they both exactly the same data type?


#3

Yes, i wrote it in the first post. Checked typeof, tried == ; doesn’t work


#4

can you post the rest of the code?


#5

Sorry, too long . The app has many modules. Solved it though… the array was reseted at some point in another module. And my test didn’t catch it.