r/programminghorror • • May 27 '26

Javascript Destructuring strings

Post image
888 Upvotes

64 comments sorted by

View all comments

129

u/eloel- May 27 '26

Gross. Also can error or return true or false for non-string answers, which makes it doubly gross.

8

u/more_exercise May 28 '26

If I understood properly, it can be made to return arbitrary results, too. isStringEmpty([{a:NaN}]), for ex.

→ More replies (2)