this post was submitted on 23 Apr 2026
348 points (97.0% liked)

Programmer Humor

31090 readers
703 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] JohnAnthony@lemmy.dbzer0.com 4 points 22 hours ago

Beginner mistake, which is perfectly fine! Just use i-1 inside the loop and i <= values.Length as the condition.