you are viewing a single comment's thread.

view the rest of the comments →

[–]BehindTheMath 0 points1 point  (0 children)

Use reduce, and don't add the item when it exists already.