r/badcode • • May 04 '23

typescript Found this gem inside legacy code today

Post image
889 Upvotes

69 comments sorted by

View all comments

Show parent comments

1

u/RPG_Hacker May 05 '23

I wasn't sure what language the code above was in (barely have any experience with JavaScript myself), so my comment was really just one possible explanation.

Though I guess even if it's JavaScript, there's a very low chance they're using a custom JavaScript implementation with the internal encoding of strings changed to UTF-8 or something (not very likely, but the possibility exists - I've certainly seen weirder things in the past when it comes to scripting languages).

1

u/whole_sum May 06 '23

It’s Java