Re:Again on 0-based vs. 1-based indexing
by robertlagrant on Thursday January 21, 2021 @06:35AM
(#25857844)
I don't understand why that would be more error prone than using list[list.length-1]. It's just list[-1].
Re:Again on 0-based vs. 1-based indexing
by tester34 on Tuesday January 26, 2021 @04:50AM
(#25914068)
imagine if you used list[index] where index would be calculated
if you misscalculated something and went on negative, then you'd have big exception/error, but when negative indices are viable, then the code will work fine
I'm getting this right?