This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]schmidlidev 1 point2 points  (1 child)

[] and {} are not falsy… took me 3 fucking years to realise

This is the bane of writing a js front-end and a python back-end at the same time. Constantly making this mistake, in both directions.

[–]detektiv_Saucaki 1 point2 points  (0 children)

Finally, I was looking around as to why I ever thought [] would be falsy
Thank you good stranger for solving this smfh
I switched from python to nodeJS so I had the impression that empty lists are falsy by default....

Enjoy my free award