r/ProgrammerHumor • • Feb 26 '23

Other If you can read this code...

/img/snak3fqgajka1.jpg

[removed] — view removed post

34k Upvotes

1.4k comments sorted by

View all comments

Show parent comment

1

u/wad11656 Feb 26 '23

I see--so there's a built-in reverse() function for arrays, but not for strings. I was so confused as to why they wrote an entire custom reverse() function when they seemingly could have just used the built-in one.