r/ProgrammerHumor • • Mar 20 '24

Meme areJSDevsActuallySane

Post image
14k Upvotes

554 comments sorted by

View all comments

25

u/R4XD3G Mar 20 '24

Well, the issue is they forgot JSON.stringify()

19

u/Terewawa Mar 20 '24

The issue is that en object when cast to string would produce a descriptive string such as "[Object object]" which would only make sense inside a printing / logging / debugging function.

1

u/[deleted] Mar 21 '24

The issue is you are not checking for data types on runtime

1

u/Terewawa Mar 22 '24

Data type checking at runtime is a lousy practice.
If you want to enforce data types use Typescript.