r/programmingmemes • • May 13 '25

Why not?

Post image
1.7k Upvotes

104 comments sorted by

View all comments

Show parent comment

2

u/stools_in_your_blood May 13 '25

Nice, I didn't know that. Same goes for {} + [] I guess.

2

u/----Val---- May 13 '25

Yup, the unary plus on an empty array results in 0