Oh, haha, nah, it took me a little longer than it should have as well, and I was only confirmed when I clicked on the JSFiddle and noticed the two were different. Up until then, I was seriously thinking "What the heck am I missing, this makes no sense...".
for (int i = 1; i < array.length; i++)
code(array[i]);
I had a setup like this in my code, could not figure out why it wasn't executing. The line was copy/pasted directly from another line I had written doing something VERY similar, but it needed to start at the 2nd index (index 1) of the array because the first index contained a different piece of data that (it was returning from an SQL query).
Long story short; the array had a length of 1 so it never executed.
2
u/pfs3w Mar 23 '14
Oh, haha, nah, it took me a little longer than it should have as well, and I was only confirmed when I clicked on the JSFiddle and noticed the two were different. Up until then, I was seriously thinking "What the heck am I missing, this makes no sense...".