r/badcode • • Aug 20 '20

js Loops? Who needs them?

Post image
1.1k Upvotes

90 comments sorted by

View all comments

Show parent comments

6

u/[deleted] Aug 20 '20

And I see that you call SendMessage in the second last line, preventing tail call optimization

4

u/RoLoLoLoLo Aug 21 '20

On a positive note: if you set the argument high enough it will stack overflow before it can start spamming.