3 ms·
Edit: brain not woken up yet. It’s because of zero indexing. ———- Original question: Out of curiosity, why the +1?
by dagmx 6y ago
Edit: brain not woken up yet. It’s because of zero indexing.
———-
Original question:
Out of curiosity, why the +1?
- Sosh101 6y agoZero indexing probably
- dagmx 6y agoMakes sense. My brains clearly not woken up yet because I thought the `i` check accounted for the zero indexing.
- tryptophan 6y agoArrays start at 0. example_array[5] is actually the 6th number in the array.
- dagmx 6y agoAh yeah that makes sense. I was thinking the `i` check already accounted for the zero indexing.