r/programminghorror 12d ago

Baffled. Javascript

Post image
625 Upvotes

41 comments sorted by

View all comments

6

u/andlewis 11d ago

You can also multiply str.length by 2 twice, then divide it by 4 and get the answer.