• gandalf_der_13te@feddit.orgOP
    link
    fedilink
    arrow-up
    1
    ·
    4 days ago

    it’s not just zero-based indexing though. i’ve had situations like these a couple of times: write a for ... of loop to iterate through the elements of an iterable. a lot of the times, there’s an unwanted first / last element in the list (that doesn’t actually belong there) and i forget to remove it, then end up with garbage data in the result set.